All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cdk8s.plus.DeploymentSpecDefinition Maven / Gradle / Ivy

There is a newer version: 0.33.0
Show newest version
package org.cdk8s.plus;

/**
 * DeploymentSpec is the specification of the desired behavior of the Deployment.
 * 

* EXPERIMENTAL */ @javax.annotation.Generated(value = "jsii-pacmak/1.7.0 (build 179a3a5)", date = "2020-06-29T13:29:38.490Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = org.cdk8s.plus.$Module.class, fqn = "cdk8s-plus.DeploymentSpecDefinition") public class DeploymentSpecDefinition extends software.amazon.jsii.JsiiObject { protected DeploymentSpecDefinition(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected DeploymentSpecDefinition(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * EXPERIMENTAL *

* @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public DeploymentSpecDefinition(final @org.jetbrains.annotations.Nullable org.cdk8s.plus.DeploymentSpec props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { props }); } /** * EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public DeploymentSpecDefinition() { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); } /** * Configure a label selector to this deployment. *

* Pods that have the label will be selected by deployments configured with this spec. *

* EXPERIMENTAL *

* @param key - The label key. This parameter is required. * @param value - The label value. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public void selectByLabel(final @org.jetbrains.annotations.NotNull java.lang.String key, final @org.jetbrains.annotations.NotNull java.lang.String value) { this.jsiiCall("selectByLabel", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(key, "key is required"), java.util.Objects.requireNonNull(value, "value is required") }); } /** * The labels this deployment will match against in order to select pods. *

* Returns a a copy. Use selectByLabel() to add labels. *

* EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.Map getLabelSelector() { return java.util.Collections.unmodifiableMap(this.jsiiGet("labelSelector", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** * Template for pod metadata. *

* EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull org.cdk8s.ApiObjectMetadataDefinition getPodMetadataTemplate() { return this.jsiiGet("podMetadataTemplate", org.cdk8s.ApiObjectMetadataDefinition.class); } /** * Provides access to the underlying pod template spec. *

* You can use this field to apply post instatiation mutations * to the spec. *

* EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull org.cdk8s.plus.PodSpecDefinition getPodSpecTemplate() { return this.jsiiGet("podSpecTemplate", org.cdk8s.plus.PodSpecDefinition.class); } /** * Number of desired pods. *

* EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.Nullable java.lang.Number getReplicas() { return this.jsiiGet("replicas", java.lang.Number.class); } /** * A fluent builder for {@link org.cdk8s.plus.DeploymentSpecDefinition}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * EXPERIMENTAL *

* @return a new instance of {@link Builder}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create() { return new Builder(); } private org.cdk8s.plus.DeploymentSpec.Builder props; private Builder() { } /** * Template for pod metadata. *

* EXPERIMENTAL *

* @return {@code this} * @param podMetadataTemplate Template for pod metadata. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder podMetadataTemplate(final org.cdk8s.ApiObjectMetadata podMetadataTemplate) { this.props().podMetadataTemplate(podMetadataTemplate); return this; } /** * Template for pod specs. *

* EXPERIMENTAL *

* @return {@code this} * @param podSpecTemplate Template for pod specs. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder podSpecTemplate(final org.cdk8s.plus.PodSpec podSpecTemplate) { this.props().podSpecTemplate(podSpecTemplate); return this; } /** * Number of desired pods. *

* Default: 1 *

* EXPERIMENTAL *

* @return {@code this} * @param replicas Number of desired pods. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder replicas(final java.lang.Number replicas) { this.props().replicas(replicas); return this; } /** * @returns a newly built instance of {@link org.cdk8s.plus.DeploymentSpecDefinition}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public org.cdk8s.plus.DeploymentSpecDefinition build() { return new org.cdk8s.plus.DeploymentSpecDefinition( this.props != null ? this.props.build() : null ); } private org.cdk8s.plus.DeploymentSpec.Builder props() { if (this.props == null) { this.props = new org.cdk8s.plus.DeploymentSpec.Builder(); } return this.props; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy