software.amazon.awscdk.services.ecs.FargateServiceProps Maven / Gradle / Ivy
Show all versions of ecs Show documentation
package software.amazon.awscdk.services.ecs;
/**
* The properties for defining a service using the Fargate launch type.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.29.0 (build 41df200)", date = "2021-05-25T18:24:57.052Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ecs.$Module.class, fqn = "@aws-cdk/aws-ecs.FargateServiceProps")
@software.amazon.jsii.Jsii.Proxy(FargateServiceProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface FargateServiceProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.ecs.BaseServiceOptions {
/**
* The task definition to use for tasks in the service.
*
* [disable-awslint:ref-via-interface]
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecs.TaskDefinition getTaskDefinition();
/**
* Specifies whether the task's elastic network interface receives a public IP address.
*
* If true, each task will receive a public IP address.
*
* Default: false
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getAssignPublicIp() {
return null;
}
/**
* The platform version on which to run your service.
*
* If one is not specified, the LATEST platform version is used by default. For more information, see
* AWS Fargate Platform Versions
* in the Amazon Elastic Container Service Developer Guide.
*
* Default: Latest
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecs.FargatePlatformVersion getPlatformVersion() {
return null;
}
/**
* (deprecated) Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
*
* Tags can only be propagated to the tasks within the service during service creation.
*
* Default: PropagatedTagSource.NONE
*
* @deprecated Use `propagateTags` instead.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecs.PropagatedTagSource getPropagateTaskTagsFrom() {
return null;
}
/**
* (deprecated) The security groups to associate with the service.
*
* If you do not specify a security group, the default security group for the VPC is used.
*
* Default: - A new security group is created.
*
* @deprecated use securityGroups instead.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.ISecurityGroup getSecurityGroup() {
return null;
}
/**
* The security groups to associate with the service.
*
* If you do not specify a security group, the default security group for the VPC is used.
*
* Default: - A new security group is created.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getSecurityGroups() {
return null;
}
/**
* The subnets to associate with the service.
*
* Default: - Public subnets if `assignPublicIp` is set, otherwise the first available one of Private, Isolated, Public, in that order.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.SubnetSelection getVpcSubnets() {
return null;
}
/**
* @return a {@link Builder} of {@link FargateServiceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link FargateServiceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
private software.amazon.awscdk.services.ecs.TaskDefinition taskDefinition;
private java.lang.Boolean assignPublicIp;
private software.amazon.awscdk.services.ecs.FargatePlatformVersion platformVersion;
private software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTaskTagsFrom;
private software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup;
private java.util.List securityGroups;
private software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets;
private software.amazon.awscdk.services.ecs.ICluster cluster;
private java.util.List capacityProviderStrategies;
private software.amazon.awscdk.services.ecs.DeploymentCircuitBreaker circuitBreaker;
private software.amazon.awscdk.services.ecs.CloudMapOptions cloudMapOptions;
private software.amazon.awscdk.services.ecs.DeploymentController deploymentController;
private java.lang.Number desiredCount;
private java.lang.Boolean enableEcsManagedTags;
private software.amazon.awscdk.core.Duration healthCheckGracePeriod;
private java.lang.Number maxHealthyPercent;
private java.lang.Number minHealthyPercent;
private software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTags;
private java.lang.String serviceName;
/**
* Sets the value of {@link FargateServiceProps#getTaskDefinition}
* @param taskDefinition The task definition to use for tasks in the service. This parameter is required.
* [disable-awslint:ref-via-interface]
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder taskDefinition(software.amazon.awscdk.services.ecs.TaskDefinition taskDefinition) {
this.taskDefinition = taskDefinition;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getAssignPublicIp}
* @param assignPublicIp Specifies whether the task's elastic network interface receives a public IP address.
* If true, each task will receive a public IP address.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder assignPublicIp(java.lang.Boolean assignPublicIp) {
this.assignPublicIp = assignPublicIp;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getPlatformVersion}
* @param platformVersion The platform version on which to run your service.
* If one is not specified, the LATEST platform version is used by default. For more information, see
* AWS Fargate Platform Versions
* in the Amazon Elastic Container Service Developer Guide.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder platformVersion(software.amazon.awscdk.services.ecs.FargatePlatformVersion platformVersion) {
this.platformVersion = platformVersion;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getPropagateTaskTagsFrom}
* @param propagateTaskTagsFrom Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
* Tags can only be propagated to the tasks within the service during service creation.
* @return {@code this}
* @deprecated Use `propagateTags` instead.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder propagateTaskTagsFrom(software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTaskTagsFrom) {
this.propagateTaskTagsFrom = propagateTaskTagsFrom;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getSecurityGroup}
* @param securityGroup The security groups to associate with the service.
* If you do not specify a security group, the default security group for the VPC is used.
* @return {@code this}
* @deprecated use securityGroups instead.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder securityGroup(software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup) {
this.securityGroup = securityGroup;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getSecurityGroups}
* @param securityGroups The security groups to associate with the service.
* If you do not specify a security group, the default security group for the VPC is used.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder securityGroups(java.util.List extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups) {
this.securityGroups = (java.util.List)securityGroups;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getVpcSubnets}
* @param vpcSubnets The subnets to associate with the service.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpcSubnets(software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets) {
this.vpcSubnets = vpcSubnets;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getCluster}
* @param cluster The name of the cluster that hosts the service. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder cluster(software.amazon.awscdk.services.ecs.ICluster cluster) {
this.cluster = cluster;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getCapacityProviderStrategies}
* @param capacityProviderStrategies A list of Capacity Provider strategies used to place a service.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder capacityProviderStrategies(java.util.List extends software.amazon.awscdk.services.ecs.CapacityProviderStrategy> capacityProviderStrategies) {
this.capacityProviderStrategies = (java.util.List)capacityProviderStrategies;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getCircuitBreaker}
* @param circuitBreaker Whether to enable the deployment circuit breaker.
* If this property is defined, circuit breaker will be implicitly
* enabled.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder circuitBreaker(software.amazon.awscdk.services.ecs.DeploymentCircuitBreaker circuitBreaker) {
this.circuitBreaker = circuitBreaker;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getCloudMapOptions}
* @param cloudMapOptions The options for configuring an Amazon ECS service to use service discovery.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder cloudMapOptions(software.amazon.awscdk.services.ecs.CloudMapOptions cloudMapOptions) {
this.cloudMapOptions = cloudMapOptions;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getDeploymentController}
* @param deploymentController Specifies which deployment controller to use for the service.
* For more information, see
* Amazon ECS Deployment Types
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder deploymentController(software.amazon.awscdk.services.ecs.DeploymentController deploymentController) {
this.deploymentController = deploymentController;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getDesiredCount}
* @param desiredCount The desired number of instantiations of the task definition to keep running on the service.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder desiredCount(java.lang.Number desiredCount) {
this.desiredCount = desiredCount;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getEnableEcsManagedTags}
* @param enableEcsManagedTags Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
* For more information, see
* Tagging Your Amazon ECS Resources
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enableEcsManagedTags(java.lang.Boolean enableEcsManagedTags) {
this.enableEcsManagedTags = enableEcsManagedTags;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getHealthCheckGracePeriod}
* @param healthCheckGracePeriod The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder healthCheckGracePeriod(software.amazon.awscdk.core.Duration healthCheckGracePeriod) {
this.healthCheckGracePeriod = healthCheckGracePeriod;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getMaxHealthyPercent}
* @param maxHealthyPercent The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder maxHealthyPercent(java.lang.Number maxHealthyPercent) {
this.maxHealthyPercent = maxHealthyPercent;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getMinHealthyPercent}
* @param minHealthyPercent The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder minHealthyPercent(java.lang.Number minHealthyPercent) {
this.minHealthyPercent = minHealthyPercent;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getPropagateTags}
* @param propagateTags Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
* Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder propagateTags(software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTags) {
this.propagateTags = propagateTags;
return this;
}
/**
* Sets the value of {@link FargateServiceProps#getServiceName}
* @param serviceName The name of the service.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder serviceName(java.lang.String serviceName) {
this.serviceName = serviceName;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link FargateServiceProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public FargateServiceProps build() {
return new Jsii$Proxy(taskDefinition, assignPublicIp, platformVersion, propagateTaskTagsFrom, securityGroup, securityGroups, vpcSubnets, cluster, capacityProviderStrategies, circuitBreaker, cloudMapOptions, deploymentController, desiredCount, enableEcsManagedTags, healthCheckGracePeriod, maxHealthyPercent, minHealthyPercent, propagateTags, serviceName);
}
}
/**
* An implementation for {@link FargateServiceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements FargateServiceProps {
private final software.amazon.awscdk.services.ecs.TaskDefinition taskDefinition;
private final java.lang.Boolean assignPublicIp;
private final software.amazon.awscdk.services.ecs.FargatePlatformVersion platformVersion;
private final software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTaskTagsFrom;
private final software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup;
private final java.util.List securityGroups;
private final software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets;
private final software.amazon.awscdk.services.ecs.ICluster cluster;
private final java.util.List capacityProviderStrategies;
private final software.amazon.awscdk.services.ecs.DeploymentCircuitBreaker circuitBreaker;
private final software.amazon.awscdk.services.ecs.CloudMapOptions cloudMapOptions;
private final software.amazon.awscdk.services.ecs.DeploymentController deploymentController;
private final java.lang.Number desiredCount;
private final java.lang.Boolean enableEcsManagedTags;
private final software.amazon.awscdk.core.Duration healthCheckGracePeriod;
private final java.lang.Number maxHealthyPercent;
private final java.lang.Number minHealthyPercent;
private final software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTags;
private final java.lang.String serviceName;
/**
* 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.taskDefinition = software.amazon.jsii.Kernel.get(this, "taskDefinition", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.TaskDefinition.class));
this.assignPublicIp = software.amazon.jsii.Kernel.get(this, "assignPublicIp", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.platformVersion = software.amazon.jsii.Kernel.get(this, "platformVersion", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.FargatePlatformVersion.class));
this.propagateTaskTagsFrom = software.amazon.jsii.Kernel.get(this, "propagateTaskTagsFrom", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.PropagatedTagSource.class));
this.securityGroup = software.amazon.jsii.Kernel.get(this, "securityGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISecurityGroup.class));
this.securityGroups = software.amazon.jsii.Kernel.get(this, "securityGroups", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISecurityGroup.class)));
this.vpcSubnets = software.amazon.jsii.Kernel.get(this, "vpcSubnets", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SubnetSelection.class));
this.cluster = software.amazon.jsii.Kernel.get(this, "cluster", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.ICluster.class));
this.capacityProviderStrategies = software.amazon.jsii.Kernel.get(this, "capacityProviderStrategies", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.CapacityProviderStrategy.class)));
this.circuitBreaker = software.amazon.jsii.Kernel.get(this, "circuitBreaker", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.DeploymentCircuitBreaker.class));
this.cloudMapOptions = software.amazon.jsii.Kernel.get(this, "cloudMapOptions", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.CloudMapOptions.class));
this.deploymentController = software.amazon.jsii.Kernel.get(this, "deploymentController", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.DeploymentController.class));
this.desiredCount = software.amazon.jsii.Kernel.get(this, "desiredCount", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.enableEcsManagedTags = software.amazon.jsii.Kernel.get(this, "enableECSManagedTags", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.healthCheckGracePeriod = software.amazon.jsii.Kernel.get(this, "healthCheckGracePeriod", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.Duration.class));
this.maxHealthyPercent = software.amazon.jsii.Kernel.get(this, "maxHealthyPercent", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.minHealthyPercent = software.amazon.jsii.Kernel.get(this, "minHealthyPercent", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.propagateTags = software.amazon.jsii.Kernel.get(this, "propagateTags", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.PropagatedTagSource.class));
this.serviceName = software.amazon.jsii.Kernel.get(this, "serviceName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final software.amazon.awscdk.services.ecs.TaskDefinition taskDefinition, final java.lang.Boolean assignPublicIp, final software.amazon.awscdk.services.ecs.FargatePlatformVersion platformVersion, final software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTaskTagsFrom, final software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup, final java.util.List extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups, final software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets, final software.amazon.awscdk.services.ecs.ICluster cluster, final java.util.List extends software.amazon.awscdk.services.ecs.CapacityProviderStrategy> capacityProviderStrategies, final software.amazon.awscdk.services.ecs.DeploymentCircuitBreaker circuitBreaker, final software.amazon.awscdk.services.ecs.CloudMapOptions cloudMapOptions, final software.amazon.awscdk.services.ecs.DeploymentController deploymentController, final java.lang.Number desiredCount, final java.lang.Boolean enableEcsManagedTags, final software.amazon.awscdk.core.Duration healthCheckGracePeriod, final java.lang.Number maxHealthyPercent, final java.lang.Number minHealthyPercent, final software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTags, final java.lang.String serviceName) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.taskDefinition = java.util.Objects.requireNonNull(taskDefinition, "taskDefinition is required");
this.assignPublicIp = assignPublicIp;
this.platformVersion = platformVersion;
this.propagateTaskTagsFrom = propagateTaskTagsFrom;
this.securityGroup = securityGroup;
this.securityGroups = (java.util.List)securityGroups;
this.vpcSubnets = vpcSubnets;
this.cluster = java.util.Objects.requireNonNull(cluster, "cluster is required");
this.capacityProviderStrategies = (java.util.List)capacityProviderStrategies;
this.circuitBreaker = circuitBreaker;
this.cloudMapOptions = cloudMapOptions;
this.deploymentController = deploymentController;
this.desiredCount = desiredCount;
this.enableEcsManagedTags = enableEcsManagedTags;
this.healthCheckGracePeriod = healthCheckGracePeriod;
this.maxHealthyPercent = maxHealthyPercent;
this.minHealthyPercent = minHealthyPercent;
this.propagateTags = propagateTags;
this.serviceName = serviceName;
}
@Override
public final software.amazon.awscdk.services.ecs.TaskDefinition getTaskDefinition() {
return this.taskDefinition;
}
@Override
public final java.lang.Boolean getAssignPublicIp() {
return this.assignPublicIp;
}
@Override
public final software.amazon.awscdk.services.ecs.FargatePlatformVersion getPlatformVersion() {
return this.platformVersion;
}
@Override
public final software.amazon.awscdk.services.ecs.PropagatedTagSource getPropagateTaskTagsFrom() {
return this.propagateTaskTagsFrom;
}
@Override
public final software.amazon.awscdk.services.ec2.ISecurityGroup getSecurityGroup() {
return this.securityGroup;
}
@Override
public final java.util.List getSecurityGroups() {
return this.securityGroups;
}
@Override
public final software.amazon.awscdk.services.ec2.SubnetSelection getVpcSubnets() {
return this.vpcSubnets;
}
@Override
public final software.amazon.awscdk.services.ecs.ICluster getCluster() {
return this.cluster;
}
@Override
public final java.util.List getCapacityProviderStrategies() {
return this.capacityProviderStrategies;
}
@Override
public final software.amazon.awscdk.services.ecs.DeploymentCircuitBreaker getCircuitBreaker() {
return this.circuitBreaker;
}
@Override
public final software.amazon.awscdk.services.ecs.CloudMapOptions getCloudMapOptions() {
return this.cloudMapOptions;
}
@Override
public final software.amazon.awscdk.services.ecs.DeploymentController getDeploymentController() {
return this.deploymentController;
}
@Override
public final java.lang.Number getDesiredCount() {
return this.desiredCount;
}
@Override
public final java.lang.Boolean getEnableECSManagedTags() {
return this.enableEcsManagedTags;
}
@Override
public final software.amazon.awscdk.core.Duration getHealthCheckGracePeriod() {
return this.healthCheckGracePeriod;
}
@Override
public final java.lang.Number getMaxHealthyPercent() {
return this.maxHealthyPercent;
}
@Override
public final java.lang.Number getMinHealthyPercent() {
return this.minHealthyPercent;
}
@Override
public final software.amazon.awscdk.services.ecs.PropagatedTagSource getPropagateTags() {
return this.propagateTags;
}
@Override
public final java.lang.String getServiceName() {
return this.serviceName;
}
@Override
@software.amazon.jsii.Internal
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();
data.set("taskDefinition", om.valueToTree(this.getTaskDefinition()));
if (this.getAssignPublicIp() != null) {
data.set("assignPublicIp", om.valueToTree(this.getAssignPublicIp()));
}
if (this.getPlatformVersion() != null) {
data.set("platformVersion", om.valueToTree(this.getPlatformVersion()));
}
if (this.getPropagateTaskTagsFrom() != null) {
data.set("propagateTaskTagsFrom", om.valueToTree(this.getPropagateTaskTagsFrom()));
}
if (this.getSecurityGroup() != null) {
data.set("securityGroup", om.valueToTree(this.getSecurityGroup()));
}
if (this.getSecurityGroups() != null) {
data.set("securityGroups", om.valueToTree(this.getSecurityGroups()));
}
if (this.getVpcSubnets() != null) {
data.set("vpcSubnets", om.valueToTree(this.getVpcSubnets()));
}
data.set("cluster", om.valueToTree(this.getCluster()));
if (this.getCapacityProviderStrategies() != null) {
data.set("capacityProviderStrategies", om.valueToTree(this.getCapacityProviderStrategies()));
}
if (this.getCircuitBreaker() != null) {
data.set("circuitBreaker", om.valueToTree(this.getCircuitBreaker()));
}
if (this.getCloudMapOptions() != null) {
data.set("cloudMapOptions", om.valueToTree(this.getCloudMapOptions()));
}
if (this.getDeploymentController() != null) {
data.set("deploymentController", om.valueToTree(this.getDeploymentController()));
}
if (this.getDesiredCount() != null) {
data.set("desiredCount", om.valueToTree(this.getDesiredCount()));
}
if (this.getEnableECSManagedTags() != null) {
data.set("enableECSManagedTags", om.valueToTree(this.getEnableECSManagedTags()));
}
if (this.getHealthCheckGracePeriod() != null) {
data.set("healthCheckGracePeriod", om.valueToTree(this.getHealthCheckGracePeriod()));
}
if (this.getMaxHealthyPercent() != null) {
data.set("maxHealthyPercent", om.valueToTree(this.getMaxHealthyPercent()));
}
if (this.getMinHealthyPercent() != null) {
data.set("minHealthyPercent", om.valueToTree(this.getMinHealthyPercent()));
}
if (this.getPropagateTags() != null) {
data.set("propagateTags", om.valueToTree(this.getPropagateTags()));
}
if (this.getServiceName() != null) {
data.set("serviceName", om.valueToTree(this.getServiceName()));
}
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.FargateServiceProps"));
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 final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FargateServiceProps.Jsii$Proxy that = (FargateServiceProps.Jsii$Proxy) o;
if (!taskDefinition.equals(that.taskDefinition)) return false;
if (this.assignPublicIp != null ? !this.assignPublicIp.equals(that.assignPublicIp) : that.assignPublicIp != null) return false;
if (this.platformVersion != null ? !this.platformVersion.equals(that.platformVersion) : that.platformVersion != null) return false;
if (this.propagateTaskTagsFrom != null ? !this.propagateTaskTagsFrom.equals(that.propagateTaskTagsFrom) : that.propagateTaskTagsFrom != null) return false;
if (this.securityGroup != null ? !this.securityGroup.equals(that.securityGroup) : that.securityGroup != null) return false;
if (this.securityGroups != null ? !this.securityGroups.equals(that.securityGroups) : that.securityGroups != null) return false;
if (this.vpcSubnets != null ? !this.vpcSubnets.equals(that.vpcSubnets) : that.vpcSubnets != null) return false;
if (!cluster.equals(that.cluster)) return false;
if (this.capacityProviderStrategies != null ? !this.capacityProviderStrategies.equals(that.capacityProviderStrategies) : that.capacityProviderStrategies != null) return false;
if (this.circuitBreaker != null ? !this.circuitBreaker.equals(that.circuitBreaker) : that.circuitBreaker != null) return false;
if (this.cloudMapOptions != null ? !this.cloudMapOptions.equals(that.cloudMapOptions) : that.cloudMapOptions != null) return false;
if (this.deploymentController != null ? !this.deploymentController.equals(that.deploymentController) : that.deploymentController != null) return false;
if (this.desiredCount != null ? !this.desiredCount.equals(that.desiredCount) : that.desiredCount != null) return false;
if (this.enableEcsManagedTags != null ? !this.enableEcsManagedTags.equals(that.enableEcsManagedTags) : that.enableEcsManagedTags != null) return false;
if (this.healthCheckGracePeriod != null ? !this.healthCheckGracePeriod.equals(that.healthCheckGracePeriod) : that.healthCheckGracePeriod != null) return false;
if (this.maxHealthyPercent != null ? !this.maxHealthyPercent.equals(that.maxHealthyPercent) : that.maxHealthyPercent != null) return false;
if (this.minHealthyPercent != null ? !this.minHealthyPercent.equals(that.minHealthyPercent) : that.minHealthyPercent != null) return false;
if (this.propagateTags != null ? !this.propagateTags.equals(that.propagateTags) : that.propagateTags != null) return false;
return this.serviceName != null ? this.serviceName.equals(that.serviceName) : that.serviceName == null;
}
@Override
public final int hashCode() {
int result = this.taskDefinition.hashCode();
result = 31 * result + (this.assignPublicIp != null ? this.assignPublicIp.hashCode() : 0);
result = 31 * result + (this.platformVersion != null ? this.platformVersion.hashCode() : 0);
result = 31 * result + (this.propagateTaskTagsFrom != null ? this.propagateTaskTagsFrom.hashCode() : 0);
result = 31 * result + (this.securityGroup != null ? this.securityGroup.hashCode() : 0);
result = 31 * result + (this.securityGroups != null ? this.securityGroups.hashCode() : 0);
result = 31 * result + (this.vpcSubnets != null ? this.vpcSubnets.hashCode() : 0);
result = 31 * result + (this.cluster.hashCode());
result = 31 * result + (this.capacityProviderStrategies != null ? this.capacityProviderStrategies.hashCode() : 0);
result = 31 * result + (this.circuitBreaker != null ? this.circuitBreaker.hashCode() : 0);
result = 31 * result + (this.cloudMapOptions != null ? this.cloudMapOptions.hashCode() : 0);
result = 31 * result + (this.deploymentController != null ? this.deploymentController.hashCode() : 0);
result = 31 * result + (this.desiredCount != null ? this.desiredCount.hashCode() : 0);
result = 31 * result + (this.enableEcsManagedTags != null ? this.enableEcsManagedTags.hashCode() : 0);
result = 31 * result + (this.healthCheckGracePeriod != null ? this.healthCheckGracePeriod.hashCode() : 0);
result = 31 * result + (this.maxHealthyPercent != null ? this.maxHealthyPercent.hashCode() : 0);
result = 31 * result + (this.minHealthyPercent != null ? this.minHealthyPercent.hashCode() : 0);
result = 31 * result + (this.propagateTags != null ? this.propagateTags.hashCode() : 0);
result = 31 * result + (this.serviceName != null ? this.serviceName.hashCode() : 0);
return result;
}
}
}