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

software.amazon.awscdk.services.ecs.Ec2ServiceProps Maven / Gradle / Ivy

There is a newer version: 1.204.0
Show newest version
package software.amazon.awscdk.services.ecs;

/**
 * The properties for defining a service using the EC2 launch type.
 * 

* Example: *

*

 * Cluster cluster;
 * TaskDefinition taskDefinition;
 * Vpc vpc;
 * Ec2Service service = Ec2Service.Builder.create(this, "Service").cluster(cluster).taskDefinition(taskDefinition).build();
 * LoadBalancer lb = LoadBalancer.Builder.create(this, "LB").vpc(vpc).build();
 * lb.addListener(LoadBalancerListener.builder().externalPort(80).build());
 * lb.addTarget(service.loadBalancerTarget(LoadBalancerTargetOptions.builder()
 *         .containerName("MyContainer")
 *         .containerPort(80)
 *         .build()));
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.52.1 (build 5ccc8f6)", date = "2022-01-20T19:50:05.547Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ecs.$Module.class, fqn = "@aws-cdk/aws-ecs.Ec2ServiceProps") @software.amazon.jsii.Jsii.Proxy(Ec2ServiceProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public interface Ec2ServiceProps 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. *

* This property is only used for tasks that use the awsvpc network mode. *

* Default: false */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Boolean getAssignPublicIp() { return null; } /** * Specifies whether the service will use the daemon scheduling strategy. *

* If true, the service scheduler deploys exactly one task on each container instance in your cluster. *

* When you are using this strategy, do not specify a desired number of tasks orany task placement strategies. *

* Default: false */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Boolean getDaemon() { return null; } /** * The placement constraints to use for tasks in the service. *

* For more information, see * Amazon ECS Task Placement Constraints. *

* Default: - No constraints. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.util.List getPlacementConstraints() { return null; } /** * The placement strategies to use for tasks in the service. *

* For more information, see * Amazon ECS Task Placement Strategies. *

* Default: - No strategies. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.util.List getPlacementStrategies() { return null; } /** * (deprecated) The security groups to associate with the service. *

* If you do not specify a security group, a new security group is created. *

* This property is only used for tasks that use the awsvpc network mode. *

* 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, a new security group is created. *

* This property is only used for tasks that use the awsvpc network mode. *

* 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. *

* This property is only used for tasks that use the awsvpc network mode. *

* 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 Ec2ServiceProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link Ec2ServiceProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { software.amazon.awscdk.services.ecs.TaskDefinition taskDefinition; java.lang.Boolean assignPublicIp; java.lang.Boolean daemon; java.util.List placementConstraints; java.util.List placementStrategies; software.amazon.awscdk.services.ec2.ISecurityGroup securityGroup; java.util.List securityGroups; software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets; software.amazon.awscdk.services.ecs.ICluster cluster; java.util.List capacityProviderStrategies; software.amazon.awscdk.services.ecs.DeploymentCircuitBreaker circuitBreaker; software.amazon.awscdk.services.ecs.CloudMapOptions cloudMapOptions; software.amazon.awscdk.services.ecs.DeploymentController deploymentController; java.lang.Number desiredCount; java.lang.Boolean enableEcsManagedTags; java.lang.Boolean enableExecuteCommand; software.amazon.awscdk.core.Duration healthCheckGracePeriod; java.lang.Number maxHealthyPercent; java.lang.Number minHealthyPercent; software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTags; software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTaskTagsFrom; java.lang.String serviceName; /** * Sets the value of {@link Ec2ServiceProps#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 Ec2ServiceProps#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. *

* This property is only used for tasks that use the awsvpc network mode. * @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 Ec2ServiceProps#getDaemon} * @param daemon Specifies whether the service will use the daemon scheduling strategy. * If true, the service scheduler deploys exactly one task on each container instance in your cluster. *

* When you are using this strategy, do not specify a desired number of tasks orany task placement strategies. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder daemon(java.lang.Boolean daemon) { this.daemon = daemon; return this; } /** * Sets the value of {@link Ec2ServiceProps#getPlacementConstraints} * @param placementConstraints The placement constraints to use for tasks in the service. * For more information, see * Amazon ECS Task Placement Constraints. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @SuppressWarnings("unchecked") public Builder placementConstraints(java.util.List placementConstraints) { this.placementConstraints = (java.util.List)placementConstraints; return this; } /** * Sets the value of {@link Ec2ServiceProps#getPlacementStrategies} * @param placementStrategies The placement strategies to use for tasks in the service. * For more information, see * Amazon ECS Task Placement Strategies. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @SuppressWarnings("unchecked") public Builder placementStrategies(java.util.List placementStrategies) { this.placementStrategies = (java.util.List)placementStrategies; return this; } /** * Sets the value of {@link Ec2ServiceProps#getSecurityGroup} * @param securityGroup The security groups to associate with the service. * If you do not specify a security group, a new security group is created. *

* This property is only used for tasks that use the awsvpc network mode. * @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 Ec2ServiceProps#getSecurityGroups} * @param securityGroups The security groups to associate with the service. * If you do not specify a security group, a new security group is created. *

* This property is only used for tasks that use the awsvpc network mode. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @SuppressWarnings("unchecked") public Builder securityGroups(java.util.List securityGroups) { this.securityGroups = (java.util.List)securityGroups; return this; } /** * Sets the value of {@link Ec2ServiceProps#getVpcSubnets} * @param vpcSubnets The subnets to associate with the service. * This property is only used for tasks that use the awsvpc network mode. * @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 Ec2ServiceProps#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 Ec2ServiceProps#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 capacityProviderStrategies) { this.capacityProviderStrategies = (java.util.List)capacityProviderStrategies; return this; } /** * Sets the value of {@link Ec2ServiceProps#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 Ec2ServiceProps#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 Ec2ServiceProps#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 Ec2ServiceProps#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 Ec2ServiceProps#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 Ec2ServiceProps#getEnableExecuteCommand} * @param enableExecuteCommand Whether to enable the ability to execute into a container. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder enableExecuteCommand(java.lang.Boolean enableExecuteCommand) { this.enableExecuteCommand = enableExecuteCommand; return this; } /** * Sets the value of {@link Ec2ServiceProps#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 Ec2ServiceProps#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 Ec2ServiceProps#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 Ec2ServiceProps#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 Ec2ServiceProps#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 Ec2ServiceProps#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 Ec2ServiceProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public Ec2ServiceProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link Ec2ServiceProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Ec2ServiceProps { private final software.amazon.awscdk.services.ecs.TaskDefinition taskDefinition; private final java.lang.Boolean assignPublicIp; private final java.lang.Boolean daemon; private final java.util.List placementConstraints; private final java.util.List placementStrategies; 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 java.lang.Boolean enableExecuteCommand; 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 software.amazon.awscdk.services.ecs.PropagatedTagSource propagateTaskTagsFrom; 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.daemon = software.amazon.jsii.Kernel.get(this, "daemon", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.placementConstraints = software.amazon.jsii.Kernel.get(this, "placementConstraints", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.PlacementConstraint.class))); this.placementStrategies = software.amazon.jsii.Kernel.get(this, "placementStrategies", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecs.PlacementStrategy.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.enableExecuteCommand = software.amazon.jsii.Kernel.get(this, "enableExecuteCommand", 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.propagateTaskTagsFrom = software.amazon.jsii.Kernel.get(this, "propagateTaskTagsFrom", 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 Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.taskDefinition = java.util.Objects.requireNonNull(builder.taskDefinition, "taskDefinition is required"); this.assignPublicIp = builder.assignPublicIp; this.daemon = builder.daemon; this.placementConstraints = (java.util.List)builder.placementConstraints; this.placementStrategies = (java.util.List)builder.placementStrategies; this.securityGroup = builder.securityGroup; this.securityGroups = (java.util.List)builder.securityGroups; this.vpcSubnets = builder.vpcSubnets; this.cluster = java.util.Objects.requireNonNull(builder.cluster, "cluster is required"); this.capacityProviderStrategies = (java.util.List)builder.capacityProviderStrategies; this.circuitBreaker = builder.circuitBreaker; this.cloudMapOptions = builder.cloudMapOptions; this.deploymentController = builder.deploymentController; this.desiredCount = builder.desiredCount; this.enableEcsManagedTags = builder.enableEcsManagedTags; this.enableExecuteCommand = builder.enableExecuteCommand; this.healthCheckGracePeriod = builder.healthCheckGracePeriod; this.maxHealthyPercent = builder.maxHealthyPercent; this.minHealthyPercent = builder.minHealthyPercent; this.propagateTags = builder.propagateTags; this.propagateTaskTagsFrom = builder.propagateTaskTagsFrom; this.serviceName = builder.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 java.lang.Boolean getDaemon() { return this.daemon; } @Override public final java.util.List getPlacementConstraints() { return this.placementConstraints; } @Override public final java.util.List getPlacementStrategies() { return this.placementStrategies; } @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 java.lang.Boolean getEnableExecuteCommand() { return this.enableExecuteCommand; } @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 software.amazon.awscdk.services.ecs.PropagatedTagSource getPropagateTaskTagsFrom() { return this.propagateTaskTagsFrom; } @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.getDaemon() != null) { data.set("daemon", om.valueToTree(this.getDaemon())); } if (this.getPlacementConstraints() != null) { data.set("placementConstraints", om.valueToTree(this.getPlacementConstraints())); } if (this.getPlacementStrategies() != null) { data.set("placementStrategies", om.valueToTree(this.getPlacementStrategies())); } 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.getEnableExecuteCommand() != null) { data.set("enableExecuteCommand", om.valueToTree(this.getEnableExecuteCommand())); } 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.getPropagateTaskTagsFrom() != null) { data.set("propagateTaskTagsFrom", om.valueToTree(this.getPropagateTaskTagsFrom())); } 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.Ec2ServiceProps")); 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; Ec2ServiceProps.Jsii$Proxy that = (Ec2ServiceProps.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.daemon != null ? !this.daemon.equals(that.daemon) : that.daemon != null) return false; if (this.placementConstraints != null ? !this.placementConstraints.equals(that.placementConstraints) : that.placementConstraints != null) return false; if (this.placementStrategies != null ? !this.placementStrategies.equals(that.placementStrategies) : that.placementStrategies != 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.enableExecuteCommand != null ? !this.enableExecuteCommand.equals(that.enableExecuteCommand) : that.enableExecuteCommand != 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; if (this.propagateTaskTagsFrom != null ? !this.propagateTaskTagsFrom.equals(that.propagateTaskTagsFrom) : that.propagateTaskTagsFrom != 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.daemon != null ? this.daemon.hashCode() : 0); result = 31 * result + (this.placementConstraints != null ? this.placementConstraints.hashCode() : 0); result = 31 * result + (this.placementStrategies != null ? this.placementStrategies.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.enableExecuteCommand != null ? this.enableExecuteCommand.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.propagateTaskTagsFrom != null ? this.propagateTaskTagsFrom.hashCode() : 0); result = 31 * result + (this.serviceName != null ? this.serviceName.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy