Class AwsEcsServiceDetails
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<AwsEcsServiceDetails.Builder,
AwsEcsServiceDetails>
Provides details about a service within an ECS cluster.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AwsEcsServiceDetails.Builder
builder()
The capacity provider strategy that the service uses.final String
cluster()
The ARN of the cluster that hosts the service.Deployment parameters for the service.Contains the deployment controller type that the service uses.final Integer
The number of instantiations of the task definition to run on the service.final Boolean
Whether to enable Amazon ECS managed tags for the tasks in the service.final Boolean
Whether the execute command functionality is enabled for the service.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the CapacityProviderStrategy property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the LoadBalancers property.final boolean
For responses, this returns true if the service returned a value for the PlacementConstraints property.final boolean
For responses, this returns true if the service returned a value for the PlacementStrategies property.final boolean
For responses, this returns true if the service returned a value for the ServiceRegistries property.final Integer
After a task starts, the amount of time in seconds that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks.final String
The launch type that the service uses.Information about the load balancers that the service uses.final String
name()
The name of the service.For tasks that use theawsvpc
networking mode, the VPC subnet and security group configuration.The placement constraints for the tasks in the service.Information about how tasks for the service are placed.final String
The platform version on which to run the service.final String
Indicates whether to propagate the tags from the task definition to the task or from the service to the task.final String
role()
The ARN of the IAM role that is associated with the service.final String
The scheduling strategy to use for the service.static Class
<? extends AwsEcsServiceDetails.Builder> final String
The ARN of the service.final String
The name of the service.Information about the service discovery registries to assign to the service.final String
The task definition to use for tasks in the service.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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
The capacity provider strategy that the service uses.
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 that the service uses.
-
cluster
The ARN of the cluster that hosts the service.
- Returns:
- The ARN of the cluster that hosts the service.
-
deploymentConfiguration
Deployment parameters for the service. Includes the number of tasks that run and the order in which to start and stop tasks.
- Returns:
- Deployment parameters for the service. Includes the number of tasks that run and the order in which to start and stop tasks.
-
deploymentController
Contains the deployment controller type that the service uses.
- Returns:
- Contains the deployment controller type that the service uses.
-
desiredCount
The number of instantiations of the task definition to run on the service.
- Returns:
- The number of instantiations of the task definition to run on the service.
-
enableEcsManagedTags
Whether to enable Amazon ECS managed tags for the tasks in the service.
- Returns:
- Whether to enable Amazon ECS managed tags for the tasks in the service.
-
enableExecuteCommand
Whether the execute command functionality is enabled for the service.
- Returns:
- Whether the execute command functionality is enabled for the service.
-
healthCheckGracePeriodSeconds
After a task starts, the amount of time in seconds that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks.
- Returns:
- After a task starts, the amount of time in seconds that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks.
-
launchType
The launch type that the service uses.
Valid values:
EC2
|FARGATE
|EXTERNAL
- Returns:
- The launch type that the service uses.
Valid values:
EC2
|FARGATE
|EXTERNAL
-
hasLoadBalancers
public final boolean hasLoadBalancers()For responses, this returns true if the service returned a value for the LoadBalancers 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. -
loadBalancers
Information about the load balancers that the service uses.
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
hasLoadBalancers()
method.- Returns:
- Information about the load balancers that the service uses.
-
name
The name of the service.
- Returns:
- The name of the service.
-
networkConfiguration
For tasks that use the
awsvpc
networking mode, the VPC subnet and security group configuration.- Returns:
- For tasks that use the
awsvpc
networking mode, the VPC subnet and security group configuration.
-
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
The placement constraints for the tasks in the service.
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:
- The placement constraints for the tasks in the service.
-
hasPlacementStrategies
public final boolean hasPlacementStrategies()For responses, this returns true if the service returned a value for the PlacementStrategies 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. -
placementStrategies
Information about how tasks for the service are placed.
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
hasPlacementStrategies()
method.- Returns:
- Information about how tasks for the service are placed.
-
platformVersion
The platform version on which to run the service. Only specified for tasks that are hosted on Fargate. If a platform version is not specified, the
LATEST
platform version is used by default.- Returns:
- The platform version on which to run the service. Only specified for tasks that are hosted on Fargate. If
a platform version is not specified, the
LATEST
platform version is used by default.
-
propagateTags
Indicates whether to propagate the tags from the task definition to the task or from the service to the task. If no value is provided, then tags are not propagated.
Valid values:
TASK_DEFINITION
|SERVICE
- Returns:
- Indicates whether to propagate the tags from the task definition to the task or from the service to the
task. If no value is provided, then tags are not propagated.
Valid values:
TASK_DEFINITION
|SERVICE
-
role
The ARN of the IAM role that is associated with the service. The role allows the Amazon ECS container agent to register container instances with an Elastic Load Balancing load balancer.
- Returns:
- The ARN of the IAM role that is associated with the service. The role allows the Amazon ECS container agent to register container instances with an Elastic Load Balancing load balancer.
-
schedulingStrategy
The scheduling strategy to use for the service.
The
REPLICA
scheduling strategy places and maintains the desired number of tasks across the cluster. By default, the service scheduler spreads tasks across Availability Zones. Task placement strategies and constraints are used to customize task placement decisions.The
DAEMON
scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that are specified in the cluster. The service scheduler also evaluates the task placement constraints for running tasks and stops tasks that do not meet the placement constraints.Valid values:
REPLICA
|DAEMON
- Returns:
- The scheduling strategy to use for the service.
The
REPLICA
scheduling strategy places and maintains the desired number of tasks across the cluster. By default, the service scheduler spreads tasks across Availability Zones. Task placement strategies and constraints are used to customize task placement decisions.The
DAEMON
scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that are specified in the cluster. The service scheduler also evaluates the task placement constraints for running tasks and stops tasks that do not meet the placement constraints.Valid values:
REPLICA
|DAEMON
-
serviceArn
The ARN of the service.
- Returns:
- The ARN of the service.
-
serviceName
The name of the service.
The name can contain up to 255 characters. It can use letters, numbers, underscores, and hyphens.
- Returns:
- The name of the service.
The name can contain up to 255 characters. It can use letters, numbers, underscores, and hyphens.
-
hasServiceRegistries
public final boolean hasServiceRegistries()For responses, this returns true if the service returned a value for the ServiceRegistries 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. -
serviceRegistries
Information about the service discovery registries to assign to the service.
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
hasServiceRegistries()
method.- Returns:
- Information about the service discovery registries to assign to the service.
-
taskDefinition
The task definition to use for tasks in the service.
- Returns:
- The task definition to use for tasks in the service.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<AwsEcsServiceDetails.Builder,
AwsEcsServiceDetails> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
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. -
getValueForField
-
sdkFields
-