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

com.amazonaws.services.eventbridge.model.EcsParameters Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EventBridge module holds the client classes that are used for communicating with Amazon EventBridge Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.eventbridge.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The custom parameters to be used when the target is an Amazon ECS task. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EcsParameters implements Serializable, Cloneable, StructuredPojo { /** *

* The ARN of the task definition to use if the event target is an Amazon ECS task. *

*/ private String taskDefinitionArn; /** *

* The number of tasks to create based on TaskDefinition. The default is 1. *

*/ private Integer taskCount; /** *

* Specifies the launch type on which your task is running. The launch type that you specify here must match one of * the launch type (compatibilities) of the target task. The FARGATE value is supported only in the * Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS * in the Amazon Elastic Container Service Developer Guide. *

*/ private String launchType; /** *

* Use this structure if the ECS task uses the awsvpc network mode. This structure specifies the VPC * subnets and security groups associated with the task and whether a public IP address is to be used. This * structure is required if LaunchType is FARGATE because the awsvpc mode is * required for Fargate tasks. *

*

* If you specify NetworkConfiguration when the target ECS task doesn't use the awsvpc * network mode, the task fails. *

*/ private NetworkConfiguration networkConfiguration; /** *

* Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as * 1.1.0. *

*

* This structure is used only if LaunchType is FARGATE. For more information about valid * platform versions, see AWS Fargate Platform * Versions in the Amazon Elastic Container Service Developer Guide. *

*/ private String platformVersion; /** *

* Specifies an ECS task group for the task. The maximum length is 255 characters. *

*/ private String group; /** *

* The ARN of the task definition to use if the event target is an Amazon ECS task. *

* * @param taskDefinitionArn * The ARN of the task definition to use if the event target is an Amazon ECS task. */ public void setTaskDefinitionArn(String taskDefinitionArn) { this.taskDefinitionArn = taskDefinitionArn; } /** *

* The ARN of the task definition to use if the event target is an Amazon ECS task. *

* * @return The ARN of the task definition to use if the event target is an Amazon ECS task. */ public String getTaskDefinitionArn() { return this.taskDefinitionArn; } /** *

* The ARN of the task definition to use if the event target is an Amazon ECS task. *

* * @param taskDefinitionArn * The ARN of the task definition to use if the event target is an Amazon ECS task. * @return Returns a reference to this object so that method calls can be chained together. */ public EcsParameters withTaskDefinitionArn(String taskDefinitionArn) { setTaskDefinitionArn(taskDefinitionArn); return this; } /** *

* The number of tasks to create based on TaskDefinition. The default is 1. *

* * @param taskCount * The number of tasks to create based on TaskDefinition. The default is 1. */ public void setTaskCount(Integer taskCount) { this.taskCount = taskCount; } /** *

* The number of tasks to create based on TaskDefinition. The default is 1. *

* * @return The number of tasks to create based on TaskDefinition. The default is 1. */ public Integer getTaskCount() { return this.taskCount; } /** *

* The number of tasks to create based on TaskDefinition. The default is 1. *

* * @param taskCount * The number of tasks to create based on TaskDefinition. The default is 1. * @return Returns a reference to this object so that method calls can be chained together. */ public EcsParameters withTaskCount(Integer taskCount) { setTaskCount(taskCount); return this; } /** *

* Specifies the launch type on which your task is running. The launch type that you specify here must match one of * the launch type (compatibilities) of the target task. The FARGATE value is supported only in the * Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS * in the Amazon Elastic Container Service Developer Guide. *

* * @param launchType * Specifies the launch type on which your task is running. The launch type that you specify here must match * one of the launch type (compatibilities) of the target task. The FARGATE value is supported * only in the Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon * ECS in the Amazon Elastic Container Service Developer Guide. * @see LaunchType */ public void setLaunchType(String launchType) { this.launchType = launchType; } /** *

* Specifies the launch type on which your task is running. The launch type that you specify here must match one of * the launch type (compatibilities) of the target task. The FARGATE value is supported only in the * Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS * in the Amazon Elastic Container Service Developer Guide. *

* * @return Specifies the launch type on which your task is running. The launch type that you specify here must match * one of the launch type (compatibilities) of the target task. The FARGATE value is supported * only in the Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon * ECS in the Amazon Elastic Container Service Developer Guide. * @see LaunchType */ public String getLaunchType() { return this.launchType; } /** *

* Specifies the launch type on which your task is running. The launch type that you specify here must match one of * the launch type (compatibilities) of the target task. The FARGATE value is supported only in the * Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS * in the Amazon Elastic Container Service Developer Guide. *

* * @param launchType * Specifies the launch type on which your task is running. The launch type that you specify here must match * one of the launch type (compatibilities) of the target task. The FARGATE value is supported * only in the Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon * ECS in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see LaunchType */ public EcsParameters withLaunchType(String launchType) { setLaunchType(launchType); return this; } /** *

* Specifies the launch type on which your task is running. The launch type that you specify here must match one of * the launch type (compatibilities) of the target task. The FARGATE value is supported only in the * Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS * in the Amazon Elastic Container Service Developer Guide. *

* * @param launchType * Specifies the launch type on which your task is running. The launch type that you specify here must match * one of the launch type (compatibilities) of the target task. The FARGATE value is supported * only in the Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon * ECS in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see LaunchType */ public EcsParameters withLaunchType(LaunchType launchType) { this.launchType = launchType.toString(); return this; } /** *

* Use this structure if the ECS task uses the awsvpc network mode. This structure specifies the VPC * subnets and security groups associated with the task and whether a public IP address is to be used. This * structure is required if LaunchType is FARGATE because the awsvpc mode is * required for Fargate tasks. *

*

* If you specify NetworkConfiguration when the target ECS task doesn't use the awsvpc * network mode, the task fails. *

* * @param networkConfiguration * Use this structure if the ECS task uses the awsvpc network mode. This structure specifies the * VPC subnets and security groups associated with the task and whether a public IP address is to be used. * This structure is required if LaunchType is FARGATE because the * awsvpc mode is required for Fargate tasks.

*

* If you specify NetworkConfiguration when the target ECS task doesn't use the * awsvpc network mode, the task fails. */ public void setNetworkConfiguration(NetworkConfiguration networkConfiguration) { this.networkConfiguration = networkConfiguration; } /** *

* Use this structure if the ECS task uses the awsvpc network mode. This structure specifies the VPC * subnets and security groups associated with the task and whether a public IP address is to be used. This * structure is required if LaunchType is FARGATE because the awsvpc mode is * required for Fargate tasks. *

*

* If you specify NetworkConfiguration when the target ECS task doesn't use the awsvpc * network mode, the task fails. *

* * @return Use this structure if the ECS task uses the awsvpc network mode. This structure specifies * the VPC subnets and security groups associated with the task and whether a public IP address is to be * used. This structure is required if LaunchType is FARGATE because the * awsvpc mode is required for Fargate tasks.

*

* If you specify NetworkConfiguration when the target ECS task doesn't use the * awsvpc network mode, the task fails. */ public NetworkConfiguration getNetworkConfiguration() { return this.networkConfiguration; } /** *

* Use this structure if the ECS task uses the awsvpc network mode. This structure specifies the VPC * subnets and security groups associated with the task and whether a public IP address is to be used. This * structure is required if LaunchType is FARGATE because the awsvpc mode is * required for Fargate tasks. *

*

* If you specify NetworkConfiguration when the target ECS task doesn't use the awsvpc * network mode, the task fails. *

* * @param networkConfiguration * Use this structure if the ECS task uses the awsvpc network mode. This structure specifies the * VPC subnets and security groups associated with the task and whether a public IP address is to be used. * This structure is required if LaunchType is FARGATE because the * awsvpc mode is required for Fargate tasks.

*

* If you specify NetworkConfiguration when the target ECS task doesn't use the * awsvpc network mode, the task fails. * @return Returns a reference to this object so that method calls can be chained together. */ public EcsParameters withNetworkConfiguration(NetworkConfiguration networkConfiguration) { setNetworkConfiguration(networkConfiguration); return this; } /** *

* Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as * 1.1.0. *

*

* This structure is used only if LaunchType is FARGATE. For more information about valid * platform versions, see AWS Fargate Platform * Versions in the Amazon Elastic Container Service Developer Guide. *

* * @param platformVersion * Specifies the platform version for the task. Specify only the numeric portion of the platform version, * such as 1.1.0.

*

* This structure is used only if LaunchType is FARGATE. For more information about * valid platform versions, see AWS Fargate * Platform Versions in the Amazon Elastic Container Service Developer Guide. */ public void setPlatformVersion(String platformVersion) { this.platformVersion = platformVersion; } /** *

* Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as * 1.1.0. *

*

* This structure is used only if LaunchType is FARGATE. For more information about valid * platform versions, see AWS Fargate Platform * Versions in the Amazon Elastic Container Service Developer Guide. *

* * @return Specifies the platform version for the task. Specify only the numeric portion of the platform version, * such as 1.1.0.

*

* This structure is used only if LaunchType is FARGATE. For more information * about valid platform versions, see AWS Fargate * Platform Versions in the Amazon Elastic Container Service Developer Guide. */ public String getPlatformVersion() { return this.platformVersion; } /** *

* Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as * 1.1.0. *

*

* This structure is used only if LaunchType is FARGATE. For more information about valid * platform versions, see AWS Fargate Platform * Versions in the Amazon Elastic Container Service Developer Guide. *

* * @param platformVersion * Specifies the platform version for the task. Specify only the numeric portion of the platform version, * such as 1.1.0.

*

* This structure is used only if LaunchType is FARGATE. For more information about * valid platform versions, see AWS Fargate * Platform Versions in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public EcsParameters withPlatformVersion(String platformVersion) { setPlatformVersion(platformVersion); return this; } /** *

* Specifies an ECS task group for the task. The maximum length is 255 characters. *

* * @param group * Specifies an ECS task group for the task. The maximum length is 255 characters. */ public void setGroup(String group) { this.group = group; } /** *

* Specifies an ECS task group for the task. The maximum length is 255 characters. *

* * @return Specifies an ECS task group for the task. The maximum length is 255 characters. */ public String getGroup() { return this.group; } /** *

* Specifies an ECS task group for the task. The maximum length is 255 characters. *

* * @param group * Specifies an ECS task group for the task. The maximum length is 255 characters. * @return Returns a reference to this object so that method calls can be chained together. */ public EcsParameters withGroup(String group) { setGroup(group); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getTaskDefinitionArn() != null) sb.append("TaskDefinitionArn: ").append(getTaskDefinitionArn()).append(","); if (getTaskCount() != null) sb.append("TaskCount: ").append(getTaskCount()).append(","); if (getLaunchType() != null) sb.append("LaunchType: ").append(getLaunchType()).append(","); if (getNetworkConfiguration() != null) sb.append("NetworkConfiguration: ").append(getNetworkConfiguration()).append(","); if (getPlatformVersion() != null) sb.append("PlatformVersion: ").append(getPlatformVersion()).append(","); if (getGroup() != null) sb.append("Group: ").append(getGroup()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EcsParameters == false) return false; EcsParameters other = (EcsParameters) obj; if (other.getTaskDefinitionArn() == null ^ this.getTaskDefinitionArn() == null) return false; if (other.getTaskDefinitionArn() != null && other.getTaskDefinitionArn().equals(this.getTaskDefinitionArn()) == false) return false; if (other.getTaskCount() == null ^ this.getTaskCount() == null) return false; if (other.getTaskCount() != null && other.getTaskCount().equals(this.getTaskCount()) == false) return false; if (other.getLaunchType() == null ^ this.getLaunchType() == null) return false; if (other.getLaunchType() != null && other.getLaunchType().equals(this.getLaunchType()) == false) return false; if (other.getNetworkConfiguration() == null ^ this.getNetworkConfiguration() == null) return false; if (other.getNetworkConfiguration() != null && other.getNetworkConfiguration().equals(this.getNetworkConfiguration()) == false) return false; if (other.getPlatformVersion() == null ^ this.getPlatformVersion() == null) return false; if (other.getPlatformVersion() != null && other.getPlatformVersion().equals(this.getPlatformVersion()) == false) return false; if (other.getGroup() == null ^ this.getGroup() == null) return false; if (other.getGroup() != null && other.getGroup().equals(this.getGroup()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTaskDefinitionArn() == null) ? 0 : getTaskDefinitionArn().hashCode()); hashCode = prime * hashCode + ((getTaskCount() == null) ? 0 : getTaskCount().hashCode()); hashCode = prime * hashCode + ((getLaunchType() == null) ? 0 : getLaunchType().hashCode()); hashCode = prime * hashCode + ((getNetworkConfiguration() == null) ? 0 : getNetworkConfiguration().hashCode()); hashCode = prime * hashCode + ((getPlatformVersion() == null) ? 0 : getPlatformVersion().hashCode()); hashCode = prime * hashCode + ((getGroup() == null) ? 0 : getGroup().hashCode()); return hashCode; } @Override public EcsParameters clone() { try { return (EcsParameters) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.eventbridge.model.transform.EcsParametersMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy