software.amazon.awscdk.services.ecs.CfnCluster Maven / Gradle / Ivy
Show all versions of ecs Show documentation
package software.amazon.awscdk.services.ecs;
/**
* A CloudFormation `AWS::ECS::Cluster`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.9.0 (build 5c646d5)", date = "2020-07-28T21:12:44.551Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ecs.$Module.class, fqn = "@aws-cdk/aws-ecs.CfnCluster")
public class CfnCluster extends software.amazon.awscdk.core.CfnResource implements software.amazon.awscdk.core.IInspectable {
protected CfnCluster(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CfnCluster(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.ecs.CfnCluster.class, "CFN_RESOURCE_TYPE_NAME", java.lang.String.class);
}
/**
* Create a new `AWS::ECS::Cluster`.
*
* @param scope - scope in which this resource is defined. This parameter is required.
* @param id - scoped id of the resource. This parameter is required.
* @param props - resource properties.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public CfnCluster(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecs.CfnClusterProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), props });
}
/**
* Create a new `AWS::ECS::Cluster`.
*
* @param scope - scope in which this resource is defined. This parameter is required.
* @param id - scoped id of the resource. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public CfnCluster(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") });
}
/**
* A factory method that creates a new instance of this class from an object containing the CloudFormation properties of this resource.
*
* Used in the @aws-cdk/cloudformation-include module.
*
* EXPERIMENTAL
*
* @param scope This parameter is required.
* @param id This parameter is required.
* @param resourceAttributes This parameter is required.
* @param options This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.CfnCluster fromCloudFormation(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull java.lang.Object resourceAttributes, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.FromCloudFormationOptions options) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.ecs.CfnCluster.class, "fromCloudFormation", software.amazon.awscdk.services.ecs.CfnCluster.class, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), resourceAttributes, java.util.Objects.requireNonNull(options, "options is required") });
}
/**
* Examines the CloudFormation resource and discloses attributes.
*
* EXPERIMENTAL
*
* @param inspector - tree inspector to collect and process attributes. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public void inspect(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.TreeInspector inspector) {
this.jsiiCall("inspect", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(inspector, "inspector is required") });
}
/**
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map renderProperties(final @org.jetbrains.annotations.NotNull java.util.Map props) {
return java.util.Collections.unmodifiableMap(this.jsiiCall("renderProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)), new Object[] { java.util.Objects.requireNonNull(props, "props is required") }));
}
/**
* The CloudFormation resource type name for this resource class.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static java.lang.String CFN_RESOURCE_TYPE_NAME;
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrArn() {
return this.jsiiGet("attrArn", java.lang.String.class);
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
protected @org.jetbrains.annotations.NotNull java.util.Map getCfnProperties() {
return java.util.Collections.unmodifiableMap(this.jsiiGet("cfnProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
/**
* `AWS::ECS::Cluster.Tags`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-tags
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.TagManager getTags() {
return this.jsiiGet("tags", software.amazon.awscdk.core.TagManager.class);
}
/**
* `AWS::ECS::Cluster.CapacityProviders`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-capacityproviders
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.util.List getCapacityProviders() {
return java.util.Optional.ofNullable((java.util.List)(this.jsiiGet("capacityProviders", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))))).map(java.util.Collections::unmodifiableList).orElse(null);
}
/**
* `AWS::ECS::Cluster.CapacityProviders`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-capacityproviders
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setCapacityProviders(final @org.jetbrains.annotations.Nullable java.util.List value) {
this.jsiiSet("capacityProviders", value);
}
/**
* `AWS::ECS::Cluster.ClusterName`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustername
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getClusterName() {
return this.jsiiGet("clusterName", java.lang.String.class);
}
/**
* `AWS::ECS::Cluster.ClusterName`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustername
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setClusterName(final @org.jetbrains.annotations.Nullable java.lang.String value) {
this.jsiiSet("clusterName", value);
}
/**
* `AWS::ECS::Cluster.ClusterSettings`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.Object getClusterSettings() {
return this.jsiiGet("clusterSettings", java.lang.Object.class);
}
/**
* `AWS::ECS::Cluster.ClusterSettings`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setClusterSettings(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.core.IResolvable value) {
this.jsiiSet("clusterSettings", value);
}
/**
* `AWS::ECS::Cluster.ClusterSettings`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setClusterSettings(final @org.jetbrains.annotations.Nullable java.util.List value) {
this.jsiiSet("clusterSettings", value);
}
/**
* `AWS::ECS::Cluster.DefaultCapacityProviderStrategy`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-defaultcapacityproviderstrategy
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.Object getDefaultCapacityProviderStrategy() {
return this.jsiiGet("defaultCapacityProviderStrategy", java.lang.Object.class);
}
/**
* `AWS::ECS::Cluster.DefaultCapacityProviderStrategy`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-defaultcapacityproviderstrategy
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setDefaultCapacityProviderStrategy(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.core.IResolvable value) {
this.jsiiSet("defaultCapacityProviderStrategy", value);
}
/**
* `AWS::ECS::Cluster.DefaultCapacityProviderStrategy`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-defaultcapacityproviderstrategy
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setDefaultCapacityProviderStrategy(final @org.jetbrains.annotations.Nullable java.util.List value) {
this.jsiiSet("defaultCapacityProviderStrategy", value);
}
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-capacityproviderstrategyitem.html
*/
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ecs.$Module.class, fqn = "@aws-cdk/aws-ecs.CfnCluster.CapacityProviderStrategyItemProperty")
@software.amazon.jsii.Jsii.Proxy(CapacityProviderStrategyItemProperty.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static interface CapacityProviderStrategyItemProperty extends software.amazon.jsii.JsiiSerializable {
/**
* `CfnCluster.CapacityProviderStrategyItemProperty.Base`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-capacityproviderstrategyitem.html#cfn-ecs-cluster-capacityproviderstrategyitem-base
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getBase() {
return null;
}
/**
* `CfnCluster.CapacityProviderStrategyItemProperty.CapacityProvider`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-capacityproviderstrategyitem.html#cfn-ecs-cluster-capacityproviderstrategyitem-capacityprovider
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getCapacityProvider() {
return null;
}
/**
* `CfnCluster.CapacityProviderStrategyItemProperty.Weight`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-capacityproviderstrategyitem.html#cfn-ecs-cluster-capacityproviderstrategyitem-weight
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getWeight() {
return null;
}
/**
* @return a {@link Builder} of {@link CapacityProviderStrategyItemProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CapacityProviderStrategyItemProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
private java.lang.Number base;
private java.lang.String capacityProvider;
private java.lang.Number weight;
/**
* Sets the value of {@link CapacityProviderStrategyItemProperty#getBase}
* @param base `CfnCluster.CapacityProviderStrategyItemProperty.Base`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder base(java.lang.Number base) {
this.base = base;
return this;
}
/**
* Sets the value of {@link CapacityProviderStrategyItemProperty#getCapacityProvider}
* @param capacityProvider `CfnCluster.CapacityProviderStrategyItemProperty.CapacityProvider`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder capacityProvider(java.lang.String capacityProvider) {
this.capacityProvider = capacityProvider;
return this;
}
/**
* Sets the value of {@link CapacityProviderStrategyItemProperty#getWeight}
* @param weight `CfnCluster.CapacityProviderStrategyItemProperty.Weight`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder weight(java.lang.Number weight) {
this.weight = weight;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CapacityProviderStrategyItemProperty}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CapacityProviderStrategyItemProperty build() {
return new Jsii$Proxy(base, capacityProvider, weight);
}
}
/**
* An implementation for {@link CapacityProviderStrategyItemProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CapacityProviderStrategyItemProperty {
private final java.lang.Number base;
private final java.lang.String capacityProvider;
private final java.lang.Number weight;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.base = this.jsiiGet("base", java.lang.Number.class);
this.capacityProvider = this.jsiiGet("capacityProvider", java.lang.String.class);
this.weight = this.jsiiGet("weight", java.lang.Number.class);
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
private Jsii$Proxy(final java.lang.Number base, final java.lang.String capacityProvider, final java.lang.Number weight) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.base = base;
this.capacityProvider = capacityProvider;
this.weight = weight;
}
@Override
public java.lang.Number getBase() {
return this.base;
}
@Override
public java.lang.String getCapacityProvider() {
return this.capacityProvider;
}
@Override
public java.lang.Number getWeight() {
return this.weight;
}
@Override
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getBase() != null) {
data.set("base", om.valueToTree(this.getBase()));
}
if (this.getCapacityProvider() != null) {
data.set("capacityProvider", om.valueToTree(this.getCapacityProvider()));
}
if (this.getWeight() != null) {
data.set("weight", om.valueToTree(this.getWeight()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-ecs.CfnCluster.CapacityProviderStrategyItemProperty"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CapacityProviderStrategyItemProperty.Jsii$Proxy that = (CapacityProviderStrategyItemProperty.Jsii$Proxy) o;
if (this.base != null ? !this.base.equals(that.base) : that.base != null) return false;
if (this.capacityProvider != null ? !this.capacityProvider.equals(that.capacityProvider) : that.capacityProvider != null) return false;
return this.weight != null ? this.weight.equals(that.weight) : that.weight == null;
}
@Override
public int hashCode() {
int result = this.base != null ? this.base.hashCode() : 0;
result = 31 * result + (this.capacityProvider != null ? this.capacityProvider.hashCode() : 0);
result = 31 * result + (this.weight != null ? this.weight.hashCode() : 0);
return result;
}
}
}
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-clustersettings.html
*/
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ecs.$Module.class, fqn = "@aws-cdk/aws-ecs.CfnCluster.ClusterSettingsProperty")
@software.amazon.jsii.Jsii.Proxy(ClusterSettingsProperty.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static interface ClusterSettingsProperty extends software.amazon.jsii.JsiiSerializable {
/**
* `CfnCluster.ClusterSettingsProperty.Name`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-clustersettings.html#cfn-ecs-cluster-clustersettings-name
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getName() {
return null;
}
/**
* `CfnCluster.ClusterSettingsProperty.Value`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-clustersettings.html#cfn-ecs-cluster-clustersettings-value
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getValue() {
return null;
}
/**
* @return a {@link Builder} of {@link ClusterSettingsProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ClusterSettingsProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
private java.lang.String name;
private java.lang.String value;
/**
* Sets the value of {@link ClusterSettingsProperty#getName}
* @param name `CfnCluster.ClusterSettingsProperty.Name`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder name(java.lang.String name) {
this.name = name;
return this;
}
/**
* Sets the value of {@link ClusterSettingsProperty#getValue}
* @param value `CfnCluster.ClusterSettingsProperty.Value`.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder value(java.lang.String value) {
this.value = value;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ClusterSettingsProperty}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ClusterSettingsProperty build() {
return new Jsii$Proxy(name, value);
}
}
/**
* An implementation for {@link ClusterSettingsProperty}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ClusterSettingsProperty {
private final java.lang.String name;
private final java.lang.String value;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.name = this.jsiiGet("name", java.lang.String.class);
this.value = this.jsiiGet("value", java.lang.String.class);
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
private Jsii$Proxy(final java.lang.String name, final java.lang.String value) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.name = name;
this.value = value;
}
@Override
public java.lang.String getName() {
return this.name;
}
@Override
public java.lang.String getValue() {
return this.value;
}
@Override
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getName() != null) {
data.set("name", om.valueToTree(this.getName()));
}
if (this.getValue() != null) {
data.set("value", om.valueToTree(this.getValue()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-ecs.CfnCluster.ClusterSettingsProperty"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ClusterSettingsProperty.Jsii$Proxy that = (ClusterSettingsProperty.Jsii$Proxy) o;
if (this.name != null ? !this.name.equals(that.name) : that.name != null) return false;
return this.value != null ? this.value.equals(that.value) : that.value == null;
}
@Override
public int hashCode() {
int result = this.name != null ? this.name.hashCode() : 0;
result = 31 * result + (this.value != null ? this.value.hashCode() : 0);
return result;
}
}
}
/**
* A fluent builder for {@link software.amazon.awscdk.services.ecs.CfnCluster}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope - scope in which this resource is defined. This parameter is required.
* @param id - scoped id of the resource. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.amazon.awscdk.core.Construct scope;
private final java.lang.String id;
private software.amazon.awscdk.services.ecs.CfnClusterProps.Builder props;
private Builder(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
}
/**
* `AWS::ECS::Cluster.CapacityProviders`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-capacityproviders
* @param capacityProviders `AWS::ECS::Cluster.CapacityProviders`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder capacityProviders(final java.util.List capacityProviders) {
this.props().capacityProviders(capacityProviders);
return this;
}
/**
* `AWS::ECS::Cluster.ClusterName`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustername
* @param clusterName `AWS::ECS::Cluster.ClusterName`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder clusterName(final java.lang.String clusterName) {
this.props().clusterName(clusterName);
return this;
}
/**
* `AWS::ECS::Cluster.ClusterSettings`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings
* @param clusterSettings `AWS::ECS::Cluster.ClusterSettings`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder clusterSettings(final software.amazon.awscdk.core.IResolvable clusterSettings) {
this.props().clusterSettings(clusterSettings);
return this;
}
/**
* `AWS::ECS::Cluster.ClusterSettings`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-clustersettings
* @param clusterSettings `AWS::ECS::Cluster.ClusterSettings`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder clusterSettings(final java.util.List clusterSettings) {
this.props().clusterSettings(clusterSettings);
return this;
}
/**
* `AWS::ECS::Cluster.DefaultCapacityProviderStrategy`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-defaultcapacityproviderstrategy
* @param defaultCapacityProviderStrategy `AWS::ECS::Cluster.DefaultCapacityProviderStrategy`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder defaultCapacityProviderStrategy(final software.amazon.awscdk.core.IResolvable defaultCapacityProviderStrategy) {
this.props().defaultCapacityProviderStrategy(defaultCapacityProviderStrategy);
return this;
}
/**
* `AWS::ECS::Cluster.DefaultCapacityProviderStrategy`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-defaultcapacityproviderstrategy
* @param defaultCapacityProviderStrategy `AWS::ECS::Cluster.DefaultCapacityProviderStrategy`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder defaultCapacityProviderStrategy(final java.util.List defaultCapacityProviderStrategy) {
this.props().defaultCapacityProviderStrategy(defaultCapacityProviderStrategy);
return this;
}
/**
* `AWS::ECS::Cluster.Tags`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#cfn-ecs-cluster-tags
* @param tags `AWS::ECS::Cluster.Tags`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder tags(final java.util.List tags) {
this.props().tags(tags);
return this;
}
/**
* @returns a newly built instance of {@link software.amazon.awscdk.services.ecs.CfnCluster}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public software.amazon.awscdk.services.ecs.CfnCluster build() {
return new software.amazon.awscdk.services.ecs.CfnCluster(
this.scope,
this.id,
this.props != null ? this.props.build() : null
);
}
private software.amazon.awscdk.services.ecs.CfnClusterProps.Builder props() {
if (this.props == null) {
this.props = new software.amazon.awscdk.services.ecs.CfnClusterProps.Builder();
}
return this.props;
}
}
}