Class ResourceOptions.Builder<T extends ResourceOptions,B extends ResourceOptions.Builder<T,B>>

java.lang.Object
com.pulumi.resources.ResourceOptions.Builder<T,B>
Direct Known Subclasses:
ComponentResourceOptions.Builder, CustomResourceOptions.Builder
Enclosing class:
ResourceOptions

protected abstract static class ResourceOptions.Builder<T extends ResourceOptions,B extends ResourceOptions.Builder<T,B>> extends Object
  • Field Details

  • Constructor Details

    • Builder

      protected Builder(T options)
  • Method Details

    • id

      public B id(@Nullable Output<String> id)
      See Also:
    • id

      public B id(@Nullable String id)
      An optional existing ID to load, rather than create.
    • parent

      public B parent(@Nullable Resource parent)
      An optional parent resource to which this resource belongs.
    • dependsOn

      public B dependsOn(Resource... dependsOn)
      Optional additional explicit dependencies on other resources.
    • dependsOn

      public B dependsOn(@Nullable Output<List<Resource>> dependsOn)
      See Also:
    • dependsOn

      public B dependsOn(@Nullable List<Resource> dependsOn)
      See Also:
    • protect

      public B protect(boolean protect)
      When set to true, protect ensures this resource cannot be deleted.
    • protect

      public B protect(@Nullable Boolean protect)
      See Also:
    • ignoreChanges

      public B ignoreChanges(String... ignoreChanges)
      Ignore changes to any of the specified properties.
    • ignoreChanges

      public B ignoreChanges(@Nullable List<String> ignoreChanges)
      Ignore changes to any of the specified properties.
    • version

      public B version(@Nullable String version)
      An optional version, corresponding to the version of the provider plugin that should be used when operating on this resource. This version overrides the version information inferred from the current package and should rarely be used.
    • provider

      public B provider(@Nullable ProviderResource provider)
      An optional provider to use for this resource's CRUD operations. If no provider is supplied, the default provider for the resource's package will be used. The default provider is pulled from the parent's provider bag (@see ComponentResourceOptions.getProviders()).

      If this is a @see ComponentResourceOptions do not provide both @see provider(com.pulumi.resources.ProviderResource) and @see ComponentResourceOptions.getProviders().

    • customTimeouts

      public B customTimeouts(@Nullable CustomTimeouts customTimeouts)
      An optional CustomTimeouts configuration.
    • resourceTransformations

      public B resourceTransformations(ResourceTransformation... resourceTransformations)
      Optional list of transformations to apply to this resource during construction. The transformations are applied in order, and are applied prior to transformation applied to parent walking from the resource up to the stack.
    • resourceTransformations

      public B resourceTransformations(@Nullable List<ResourceTransformation> resourceTransformations)
      See Also:
    • aliases

      public B aliases(Alias... aliases)
      An optional list of aliases to treat this resource as matching.
    • aliases

      @SafeVarargs public final B aliases(Output<Alias>... aliases)
      See Also:
    • aliases

      public B aliases(@Nullable List<Output<Alias>> aliases)
      See Also:
    • urn

      public B urn(@Nullable String urn)
      The URN of a previously-registered resource of this type to read from the engine.
    • replaceOnChanges

      public B replaceOnChanges(String... replaceOnChanges)
      Changes to any of these property paths will force a replacement. If this list includes `"*"`, changes to any properties will force a replacement. Initialization errors from previous deployments will require replacement instead of update only if `"*"` is passed.
    • replaceOnChanges

      public B replaceOnChanges(@Nullable List<String> replaceOnChanges)
      See Also:
    • retainOnDelete

      public B retainOnDelete(boolean retainOnDelete)
      If set to True, the providers Delete method will not be called for this resource.
    • retainOnDelete

      public B retainOnDelete(@Nullable Boolean retainOnDelete)
      See Also:
    • pluginDownloadURL

      public B pluginDownloadURL(@Nullable String pluginDownloadURL)
      An optional URL, corresponding to the url from which the provider plugin that should be used when operating on this resource is downloaded from. This URL overrides the download URL inferred from the current package and should rarely be used.
    • hideDiffs

      public B hideDiffs(String... hideDiffs)
      Hide diffs collapses the diff of any mentioned property paths.
    • hideDiffs

      public B hideDiffs(@Nullable List<String> hideDiffs)
      See Also:
    • replaceWith

      public B replaceWith(Resource... replaceWith)
      If set, this resource will also be replaced whenever any of the provided resources are replaced.
    • replaceWith

      public B replaceWith(@Nullable List<Resource> replaceWith)
      See Also:
    • replacementTrigger

      public B replacementTrigger(@Nullable Output<?> replacementTrigger)
      If set, the engine will diff this with the last recorded value, and trigger a replace if they are not equal. Note that if either value is null, no comparison is done and no replacement is triggered. This means that the replacement trigger only applies to two subsequent deployments with defined triggers.