Class PutClusterCapacityProvidersRequest

All Implemented Interfaces:
SdkPojo, ToCopyableBuilder<PutClusterCapacityProvidersRequest.Builder,PutClusterCapacityProvidersRequest>

@Generated("software.amazon.awssdk:codegen") public final class PutClusterCapacityProvidersRequest extends EcsRequest implements ToCopyableBuilder<PutClusterCapacityProvidersRequest.Builder,PutClusterCapacityProvidersRequest>
  • Method Details

    • cluster

      public final String cluster()

      The short name or full Amazon Resource Name (ARN) of the cluster to modify the capacity provider settings for. If you don't specify a cluster, the default cluster is assumed.

      Returns:
      The short name or full Amazon Resource Name (ARN) of the cluster to modify the capacity provider settings for. If you don't specify a cluster, the default cluster is assumed.
    • hasCapacityProviders

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

      public final List<String> capacityProviders()

      The name of one or more capacity providers to associate with the cluster.

      If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the CreateCapacityProvider API operation.

      To use a Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be 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 hasCapacityProviders() method.

      Returns:
      The name of one or more capacity providers to associate with the cluster.

      If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the CreateCapacityProvider API operation.

      To use a Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.

    • hasDefaultCapacityProviderStrategy

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

      public final List<CapacityProviderStrategyItem> defaultCapacityProviderStrategy()

      The capacity provider strategy to use by default for the cluster.

      When creating a service or running a task on a cluster, if no capacity provider or launch type is specified then the default capacity provider strategy for the cluster is used.

      A capacity provider strategy consists of one or more capacity providers along with the base and weight to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The PutClusterCapacityProviders API is used to associate a capacity provider with a cluster. Only capacity providers with an ACTIVE or UPDATING status can be used.

      If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the CreateCapacityProvider API operation.

      To use a Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be 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 hasDefaultCapacityProviderStrategy() method.

      Returns:
      The capacity provider strategy to use by default for the cluster.

      When creating a service or running a task on a cluster, if no capacity provider or launch type is specified then the default capacity provider strategy for the cluster is used.

      A capacity provider strategy consists of one or more capacity providers along with the base and weight to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The PutClusterCapacityProviders API is used to associate a capacity provider with a cluster. Only capacity providers with an ACTIVE or UPDATING status can be used.

      If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the CreateCapacityProvider API operation.

      To use a Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT capacity providers. The Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.

    • 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<PutClusterCapacityProvidersRequest.Builder,PutClusterCapacityProvidersRequest>
      Specified by:
      toBuilder in class EcsRequest
      Returns:
      a builder for type T
    • builder

    • serializableBuilderClass

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

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

      public final boolean equals(Object obj)
      Overrides:
      equals in class AwsRequest
    • 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)
      Description copied from class: SdkRequest
      Used to retrieve the value of a field from any class that extends SdkRequest. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class) method will again be available.
      Overrides:
      getValueForField in class SdkRequest
      Parameters:
      fieldName - The name of the member to be retrieved.
      clazz - The class to cast the returned object to.
      Returns:
      Optional containing the casted return value
    • 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.