Class KubernetesPatchProps.Builder
java.lang.Object
software.amazon.awscdk.services.eks.KubernetesPatchProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<KubernetesPatchProps>
- Enclosing interface:
KubernetesPatchProps
@Stability(Stable)
public static final class KubernetesPatchProps.Builder
extends Object
implements software.amazon.jsii.Builder<KubernetesPatchProps>
A builder for
KubernetesPatchProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyPatch(Map<String, ? extends Object> applyPatch) Sets the value ofKubernetesPatchProps.getApplyPatch()build()Builds the configured instance.Sets the value ofKubernetesPatchProps.getCluster()Sets the value ofKubernetesPatchProps.getPatchType()removalPolicy(RemovalPolicy removalPolicy) Sets the value ofKubernetesPatchProps.getRemovalPolicy()resourceName(String resourceName) Sets the value ofKubernetesPatchProps.getResourceName()resourceNamespace(String resourceNamespace) Sets the value ofKubernetesPatchProps.getResourceNamespace()restorePatch(Map<String, ? extends Object> restorePatch) Sets the value ofKubernetesPatchProps.getRestorePatch()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
applyPatch
@Stability(Stable) public KubernetesPatchProps.Builder applyPatch(Map<String, ? extends Object> applyPatch) Sets the value ofKubernetesPatchProps.getApplyPatch()- Parameters:
applyPatch- The JSON object to pass tokubectl patchwhen the resource is created/updated. This parameter is required.- Returns:
this
-
cluster
Sets the value ofKubernetesPatchProps.getCluster()- Parameters:
cluster- The cluster to apply the patch to. This parameter is required. [disable-awslint:ref-via-interface]- Returns:
this
-
resourceName
Sets the value ofKubernetesPatchProps.getResourceName()- Parameters:
resourceName- The full name of the resource to patch (e.g.deployment/coredns). This parameter is required.- Returns:
this
-
restorePatch
@Stability(Stable) public KubernetesPatchProps.Builder restorePatch(Map<String, ? extends Object> restorePatch) Sets the value ofKubernetesPatchProps.getRestorePatch()- Parameters:
restorePatch- The JSON object to pass tokubectl patchwhen the resource is removed. This parameter is required.- Returns:
this
-
patchType
Sets the value ofKubernetesPatchProps.getPatchType()- Parameters:
patchType- The patch type to pass tokubectl patch. The default type used bykubectl patchis "strategic".- Returns:
this
-
removalPolicy
Sets the value ofKubernetesPatchProps.getRemovalPolicy()- Parameters:
removalPolicy- The removal policy applied to the custom resource that manages the Kubernetes patch. The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations:- The resource is removed from the template, so CloudFormation stops managing it
- A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
- The stack is deleted, so CloudFormation stops managing all resources in it
- Returns:
this
-
resourceNamespace
Sets the value ofKubernetesPatchProps.getResourceNamespace()- Parameters:
resourceNamespace- The kubernetes API namespace.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<KubernetesPatchProps>- Returns:
- a new instance of
KubernetesPatchProps - Throws:
NullPointerException- if any required attribute was not provided
-