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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic AwsEcsServiceDetails.Builderbuilder()The capacity provider strategy that the service uses.final Stringcluster()The ARN of the cluster that hosts the service.Deployment parameters for the service.Contains the deployment controller type that the service uses.final IntegerThe number of instantiations of the task definition to run on the service.final BooleanWhether to enable Amazon ECS managed tags for the tasks in the service.final BooleanWhether the execute command functionality is enabled for the service.final booleanfinal booleanequalsBySdkFields(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 booleanFor responses, this returns true if the service returned a value for the CapacityProviderStrategy property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the LoadBalancers property.final booleanFor responses, this returns true if the service returned a value for the PlacementConstraints property.final booleanFor responses, this returns true if the service returned a value for the PlacementStrategies property.final booleanFor responses, this returns true if the service returned a value for the ServiceRegistries property.final IntegerAfter a task starts, the amount of time in seconds that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks.final StringThe launch type that the service uses.Information about the load balancers that the service uses.final Stringname()The name of the service.For tasks that use theawsvpcnetworking 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 StringThe platform version on which to run the service.final StringIndicates whether to propagate the tags from the task definition to the task or from the service to the task.final Stringrole()The ARN of the IAM role that is associated with the service.final StringThe scheduling strategy to use for the service.static Class<? extends AwsEcsServiceDetails.Builder> final StringThe ARN of the service.final StringThe name of the service.Information about the service discovery registries to assign to the service.final StringThe 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 StringtoString()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
-
networkConfiguration
For tasks that use the
awsvpcnetworking mode, the VPC subnet and security group configuration.- Returns:
- For tasks that use the
awsvpcnetworking 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
LATESTplatform 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
LATESTplatform 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
REPLICAscheduling 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
DAEMONscheduling 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 don't meet the placement constraints.Valid values:
REPLICA|DAEMON- Returns:
- The scheduling strategy to use for the service.
The
REPLICAscheduling 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
DAEMONscheduling 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 don't meet the placement constraints.Valid values:
REPLICA|DAEMON
-
serviceArn
-
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:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<AwsEcsServiceDetails.Builder,AwsEcsServiceDetails> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin 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
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-