Class ServiceRevision

java.lang.Object
software.amazon.awssdk.services.ecs.model.ServiceRevision
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<ServiceRevision.Builder,ServiceRevision>

@Generated("software.amazon.awssdk:codegen") public final class ServiceRevision extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ServiceRevision.Builder,ServiceRevision>

Information about the service revision.

A service revision contains a record of the workload configuration Amazon ECS is attempting to deploy. Whenever you create or deploy a service, Amazon ECS automatically creates and captures the configuration that you're trying to deploy in the service revision. For information about service revisions, see Amazon ECS service revisions in the Amazon Elastic Container Service Developer Guide .

See Also:
  • Method Details

    • serviceRevisionArn

      public final String serviceRevisionArn()

      The ARN of the service revision.

      Returns:
      The ARN of the service revision.
    • serviceArn

      public final String serviceArn()

      The ARN of the service for the service revision.

      Returns:
      The ARN of the service for the service revision.
    • clusterArn

      public final String clusterArn()

      The ARN of the cluster that hosts the service.

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

      public final String taskDefinition()

      The task definition the service revision uses.

      Returns:
      The task definition the service revision uses.
    • 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<CapacityProviderStrategyItem> capacityProviderStrategy()

      The capacity provider strategy the service revision 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 the service revision uses.
    • launchType

      public final LaunchType launchType()

      The launch type the service revision uses.

      If the service returns an enum value that is not available in the current SDK version, launchType will return LaunchType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from launchTypeAsString().

      Returns:
      The launch type the service revision uses.
      See Also:
    • launchTypeAsString

      public final String launchTypeAsString()

      The launch type the service revision uses.

      If the service returns an enum value that is not available in the current SDK version, launchType will return LaunchType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from launchTypeAsString().

      Returns:
      The launch type the service revision uses.
      See Also:
    • platformVersion

      public final String platformVersion()

      For the Fargate launch type, the platform version the service revision uses.

      Returns:
      For the Fargate launch type, the platform version the service revision uses.
    • platformFamily

      public final String platformFamily()

      The platform family the service revision uses.

      Returns:
      The platform family the service revision uses.
    • 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<LoadBalancer> loadBalancers()

      The load balancers the service revision 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:
      The load balancers the service revision uses.
    • 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<ServiceRegistry> serviceRegistries()

      The service registries (for Service Discovery) the service revision 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 hasServiceRegistries() method.

      Returns:
      The service registries (for Service Discovery) the service revision uses.
    • networkConfiguration

      public final NetworkConfiguration networkConfiguration()
      Returns the value of the NetworkConfiguration property for this object.
      Returns:
      The value of the NetworkConfiguration property for this object.
    • hasContainerImages

      public final boolean hasContainerImages()
      For responses, this returns true if the service returned a value for the ContainerImages 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.
    • containerImages

      public final List<ContainerImage> containerImages()

      The container images the service revision 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 hasContainerImages() method.

      Returns:
      The container images the service revision uses.
    • guardDutyEnabled

      public final Boolean guardDutyEnabled()

      Indicates whether Runtime Monitoring is turned on.

      Returns:
      Indicates whether Runtime Monitoring is turned on.
    • serviceConnectConfiguration

      public final ServiceConnectConfiguration serviceConnectConfiguration()
      Returns the value of the ServiceConnectConfiguration property for this object.
      Returns:
      The value of the ServiceConnectConfiguration property for this object.
    • hasVolumeConfigurations

      public final boolean hasVolumeConfigurations()
      For responses, this returns true if the service returned a value for the VolumeConfigurations 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.
    • volumeConfigurations

      public final List<ServiceVolumeConfiguration> volumeConfigurations()

      The volumes that are configured at deployment that the service revision 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 hasVolumeConfigurations() method.

      Returns:
      The volumes that are configured at deployment that the service revision uses.
    • fargateEphemeralStorage

      public final DeploymentEphemeralStorage fargateEphemeralStorage()
      Returns the value of the FargateEphemeralStorage property for this object.
      Returns:
      The value of the FargateEphemeralStorage property for this object.
    • createdAt

      public final Instant createdAt()

      The time that the service revision was created. The format is yyyy-mm-dd HH:mm:ss.SSSSS.

      Returns:
      The time that the service revision was created. The format is yyyy-mm-dd HH:mm:ss.SSSSS.
    • hasVpcLatticeConfigurations

      public final boolean hasVpcLatticeConfigurations()
      For responses, this returns true if the service returned a value for the VpcLatticeConfigurations 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.
    • vpcLatticeConfigurations

      public final List<VpcLatticeConfiguration> vpcLatticeConfigurations()

      The VPC Lattice configuration for the service revision.

      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 hasVpcLatticeConfigurations() method.

      Returns:
      The VPC Lattice configuration for the service revision.
    • resolvedConfiguration

      public final ResolvedConfiguration resolvedConfiguration()

      The resolved configuration for the service revision which contains the actual resources your service revision uses, such as which target groups serve traffic.

      Returns:
      The resolved configuration for the service revision which contains the actual resources your service revision uses, such as which target groups serve traffic.
    • toBuilder

      public ServiceRevision.Builder 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 interface ToCopyableBuilder<ServiceRevision.Builder,ServiceRevision>
      Returns:
      a builder for type T
    • builder

      public static ServiceRevision.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ServiceRevision.Builder> serializableBuilderClass()
    • hashCode

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

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      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 an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.