Class AwsEcsServiceDetails

    • Method Detail

      • 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 the isEmpty() 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<AwsEcsServiceCapacityProviderStrategyDetails> 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

        public final String cluster()

        The ARN of the cluster that hosts the service.

        Returns:
        The ARN of the cluster that hosts the service.
      • deploymentConfiguration

        public final AwsEcsServiceDeploymentConfigurationDetails 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

        public final AwsEcsServiceDeploymentControllerDetails deploymentController()

        Contains the deployment controller type that the service uses.

        Returns:
        Contains the deployment controller type that the service uses.
      • desiredCount

        public final Integer 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

        public final Boolean 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

        public final Boolean enableExecuteCommand()

        Whether the execute command functionality is enabled for the service.

        Returns:
        Whether the execute command functionality is enabled for the service.
      • healthCheckGracePeriodSeconds

        public final Integer 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

        public final String 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 the isEmpty() 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

        public final List<AwsEcsServiceLoadBalancersDetails> 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

        public final String name()

        The name of the service.

        Returns:
        The name of the service.
      • networkConfiguration

        public final AwsEcsServiceNetworkConfigurationDetails 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 the isEmpty() 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<AwsEcsServicePlacementConstraintsDetails> 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 the isEmpty() 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

        public final List<AwsEcsServicePlacementStrategiesDetails> 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

        public final String 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

        public final String 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

        public final String 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

        public final String 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

        public final String serviceArn()

        The ARN of the service.

        Returns:
        The ARN of the service.
      • serviceName

        public final String 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 the isEmpty() 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

        public final List<AwsEcsServiceServiceRegistriesDetails> 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

        public final String taskDefinition()

        The task definition to use for tasks in the service.

        Returns:
        The task definition to use for tasks in the service.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)