Package org.cdk8s.plus24.k8s
Class CustomResourceConversion.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.CustomResourceConversion.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<CustomResourceConversion>
- Enclosing interface:
- CustomResourceConversion
@Stability(Stable) public static final class CustomResourceConversion.Builder extends Object implements software.amazon.jsii.Builder<CustomResourceConversion>
A builder forCustomResourceConversion
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomResourceConversion
build()
Builds the configured instance.CustomResourceConversion.Builder
strategy(String strategy)
Sets the value ofCustomResourceConversion.getStrategy()
CustomResourceConversion.Builder
webhook(WebhookConversion webhook)
Sets the value ofCustomResourceConversion.getWebhook()
-
-
-
Method Detail
-
strategy
@Stability(Stable) public CustomResourceConversion.Builder strategy(String strategy)
Sets the value ofCustomResourceConversion.getStrategy()
- Parameters:
strategy
- strategy specifies how custom resources are converted between versions. This parameter is required. Allowed values are: -None
: The converter only change the apiVersion and would not touch any other field in the custom resource. -Webhook
: API Server will call to an external webhook to do the conversion. Additional information is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.- Returns:
this
-
webhook
@Stability(Stable) public CustomResourceConversion.Builder webhook(WebhookConversion webhook)
Sets the value ofCustomResourceConversion.getWebhook()
- Parameters:
webhook
- webhook describes how to call the conversion webhook. Required whenstrategy
is set toWebhook
.- Returns:
this
-
build
@Stability(Stable) public CustomResourceConversion build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CustomResourceConversion>
- Returns:
- a new instance of
CustomResourceConversion
- Throws:
NullPointerException
- if any required attribute was not provided
-
-