Class EcsParameters
- java.lang.Object
-
- software.amazon.awssdk.services.eventbridge.model.EcsParameters
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<EcsParameters.Builder,EcsParameters>
@Generated("software.amazon.awssdk:codegen") public final class EcsParameters extends Object implements SdkPojo, Serializable, ToCopyableBuilder<EcsParameters.Builder,EcsParameters>
The custom parameters to be used when the target is an Amazon ECS task.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
EcsParameters.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EcsParameters.Builder
builder()
List<CapacityProviderStrategyItem>
capacityProviderStrategy()
The capacity provider strategy to use for the task.Boolean
enableECSManagedTags()
Specifies whether to enable Amazon ECS managed tags for the task.Boolean
enableExecuteCommand()
Whether or not to enable the execute command functionality for the containers in this task.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
String
group()
Specifies an ECS task group for the task.boolean
hasCapacityProviderStrategy()
For responses, this returns true if the service returned a value for the CapacityProviderStrategy property.int
hashCode()
boolean
hasPlacementConstraints()
For responses, this returns true if the service returned a value for the PlacementConstraints property.boolean
hasPlacementStrategy()
For responses, this returns true if the service returned a value for the PlacementStrategy property.boolean
hasTags()
For responses, this returns true if the service returned a value for the Tags property.LaunchType
launchType()
Specifies the launch type on which your task is running.String
launchTypeAsString()
Specifies the launch type on which your task is running.NetworkConfiguration
networkConfiguration()
Use this structure if the Amazon ECS task uses theawsvpc
network mode.List<PlacementConstraint>
placementConstraints()
An array of placement constraint objects to use for the task.List<PlacementStrategy>
placementStrategy()
The placement strategy objects to use for the task.String
platformVersion()
Specifies the platform version for the task.PropagateTags
propagateTags()
Specifies whether to propagate the tags from the task definition to the task.String
propagateTagsAsString()
Specifies whether to propagate the tags from the task definition to the task.String
referenceId()
The reference ID to use for the task.List<SdkField<?>>
sdkFields()
static Class<? extends EcsParameters.Builder>
serializableBuilderClass()
List<Tag>
tags()
The metadata that you apply to the task to help you categorize and organize them.Integer
taskCount()
The number of tasks to create based onTaskDefinition
.String
taskDefinitionArn()
The ARN of the task definition to use if the event target is an Amazon ECS task.EcsParameters.Builder
toBuilder()
String
toString()
Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
taskDefinitionArn
public final String taskDefinitionArn()
The ARN of the task definition to use if the event target is an Amazon ECS task.
- Returns:
- The ARN of the task definition to use if the event target is an Amazon ECS task.
-
taskCount
public final Integer taskCount()
The number of tasks to create based on
TaskDefinition
. The default is 1.- Returns:
- The number of tasks to create based on
TaskDefinition
. The default is 1.
-
launchType
public final 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 Fargate with Amazon ECS is supported. For more information, see Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide.If the service returns an enum value that is not available in the current SDK version,
launchType
will returnLaunchType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromlaunchTypeAsString()
.- Returns:
- 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 Fargate with Amazon ECS is supported. For more information, see Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide. - See Also:
LaunchType
-
launchTypeAsString
public final String launchTypeAsString()
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 Fargate with Amazon ECS is supported. For more information, see Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide.If the service returns an enum value that is not available in the current SDK version,
launchType
will returnLaunchType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromlaunchTypeAsString()
.- Returns:
- 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 Fargate with Amazon ECS is supported. For more information, see Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide. - See Also:
LaunchType
-
networkConfiguration
public final NetworkConfiguration networkConfiguration()
Use this structure if the Amazon 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 ifLaunchType
isFARGATE
because theawsvpc
mode is required for Fargate tasks.If you specify
NetworkConfiguration
when the target ECS task does not use theawsvpc
network mode, the task fails.- Returns:
- Use this structure if the Amazon 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 ifLaunchType
isFARGATE
because theawsvpc
mode is required for Fargate tasks.If you specify
NetworkConfiguration
when the target ECS task does not use theawsvpc
network mode, the task fails.
-
platformVersion
public final String 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
isFARGATE
. For more information about valid platform versions, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.- Returns:
- 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
isFARGATE
. For more information about valid platform versions, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
-
group
public final String group()
Specifies an ECS task group for the task. The maximum length is 255 characters.
- Returns:
- Specifies an ECS task group for the task. The maximum length is 255 characters.
-
hasCapacityProviderStrategy
public final boolean hasCapacityProviderStrategy()
For responses, this returns true if the service returned a value for the CapacityProviderStrategy property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
capacityProviderStrategy
public final List<CapacityProviderStrategyItem> capacityProviderStrategy()
The capacity provider strategy to use for the task.
If a
capacityProviderStrategy
is specified, thelaunchType
parameter must be omitted. If nocapacityProviderStrategy
or launchType is specified, thedefaultCapacityProviderStrategy
for the cluster is used.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasCapacityProviderStrategy()
method.- Returns:
- The capacity provider strategy to use for the task.
If a
capacityProviderStrategy
is specified, thelaunchType
parameter must be omitted. If nocapacityProviderStrategy
or launchType is specified, thedefaultCapacityProviderStrategy
for the cluster is used.
-
enableECSManagedTags
public final Boolean enableECSManagedTags()
Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
- Returns:
- Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
-
enableExecuteCommand
public final Boolean enableExecuteCommand()
Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.
- Returns:
- Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.
-
hasPlacementConstraints
public final boolean hasPlacementConstraints()
For responses, this returns true if the service returned a value for the PlacementConstraints property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
placementConstraints
public final List<PlacementConstraint> placementConstraints()
An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasPlacementConstraints()
method.- Returns:
- An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).
-
hasPlacementStrategy
public final boolean hasPlacementStrategy()
For responses, this returns true if the service returned a value for the PlacementStrategy property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
placementStrategy
public final List<PlacementStrategy> placementStrategy()
The placement strategy objects to use for the task. You can specify a maximum of five strategy rules per task.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasPlacementStrategy()
method.- Returns:
- The placement strategy objects to use for the task. You can specify a maximum of five strategy rules per task.
-
propagateTags
public final PropagateTags propagateTags()
Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.
If the service returns an enum value that is not available in the current SDK version,
propagateTags
will returnPropagateTags.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available frompropagateTagsAsString()
.- Returns:
- Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.
- See Also:
PropagateTags
-
propagateTagsAsString
public final String propagateTagsAsString()
Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.
If the service returns an enum value that is not available in the current SDK version,
propagateTags
will returnPropagateTags.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available frompropagateTagsAsString()
.- Returns:
- Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.
- See Also:
PropagateTags
-
referenceId
public final String referenceId()
The reference ID to use for the task.
- Returns:
- The reference ID to use for the task.
-
hasTags
public final boolean hasTags()
For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
tags
public final List<Tag> tags()
The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()
method.- Returns:
- The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.
-
toBuilder
public EcsParameters.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<EcsParameters.Builder,EcsParameters>
-
builder
public static EcsParameters.Builder builder()
-
serializableBuilderClass
public static Class<? extends EcsParameters.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
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.
-
-