Class Filter
- java.lang.Object
-
- software.amazon.awssdk.services.sagemaker.model.Filter
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Filter.Builder,Filter>
@Generated("software.amazon.awssdk:codegen") public final class Filter extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Filter.Builder,Filter>
A conditional statement for a search expression that includes a resource property, a Boolean operator, and a value. Resources that match the statement are returned in the results from the Search API.
If you specify a
Value, but not anOperator, SageMaker uses the equals operator.In search, there are several property types:
- Metrics
-
To define a metric filter, enter a value using the form
"Metrics.<name>", where<name>is a metric name. For example, the following filter searches for training jobs with an"accuracy"metric greater than"0.9":{"Name": "Metrics.accuracy","Operator": "GreaterThan","Value": "0.9"} - HyperParameters
-
To define a hyperparameter filter, enter a value with the form
"HyperParameters.<name>". Decimal hyperparameter values are treated as a decimal in a comparison if the specifiedValueis also a decimal value. If the specifiedValueis an integer, the decimal hyperparameter values are treated as integers. For example, the following filter is satisfied by training jobs with a"learning_rate"hyperparameter that is less than"0.5":{"Name": "HyperParameters.learning_rate","Operator": "LessThan","Value": "0.5"} - Tags
-
To define a tag filter, enter a value with the form
Tags.<key>.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFilter.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Filter.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()Stringname()A resource property name.Operatoroperator()A Boolean binary operator that is used to evaluate the filter.StringoperatorAsString()A Boolean binary operator that is used to evaluate the filter.List<SdkField<?>>sdkFields()static Class<? extends Filter.Builder>serializableBuilderClass()Filter.BuildertoBuilder()StringtoString()Returns a string representation of this object.Stringvalue()A value used withNameandOperatorto determine which resources satisfy the filter's condition.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
name
public final String name()
A resource property name. For example,
TrainingJobName. For valid property names, see SearchRecord. You must specify a valid property for the resource.- Returns:
- A resource property name. For example,
TrainingJobName. For valid property names, see SearchRecord. You must specify a valid property for the resource.
-
operator
public final Operator operator()
A Boolean binary operator that is used to evaluate the filter. The operator field contains one of the following values:
- Equals
-
The value of
NameequalsValue. - NotEquals
-
The value of
Namedoesn't equalValue. - Exists
-
The
Nameproperty exists. - NotExists
-
The
Nameproperty does not exist. - GreaterThan
-
The value of
Nameis greater thanValue. Not supported for text properties. - GreaterThanOrEqualTo
-
The value of
Nameis greater than or equal toValue. Not supported for text properties. - LessThan
-
The value of
Nameis less thanValue. Not supported for text properties. - LessThanOrEqualTo
-
The value of
Nameis less than or equal toValue. Not supported for text properties. - In
-
The value of
Nameis one of the comma delimited strings inValue. Only supported for text properties. - Contains
-
The value of
Namecontains the stringValue. Only supported for text properties.A
SearchExpressioncan include theContainsoperator multiple times when the value ofNameis one of the following:-
Experiment.DisplayName -
Experiment.ExperimentName -
Experiment.Tags -
Trial.DisplayName -
Trial.TrialName -
Trial.Tags -
TrialComponent.DisplayName -
TrialComponent.TrialComponentName -
TrialComponent.Tags -
TrialComponent.InputArtifacts -
TrialComponent.OutputArtifacts
A
SearchExpressioncan include only oneContainsoperator for all other values ofName. In these cases, if you include multipleContainsoperators in theSearchExpression, the result is the following error message: "'CONTAINS' operator usage limit of 1 exceeded." -
If the service returns an enum value that is not available in the current SDK version,
operatorwill returnOperator.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromoperatorAsString().- Returns:
- A Boolean binary operator that is used to evaluate the filter. The operator field contains one of the
following values:
- Equals
-
The value of
NameequalsValue. - NotEquals
-
The value of
Namedoesn't equalValue. - Exists
-
The
Nameproperty exists. - NotExists
-
The
Nameproperty does not exist. - GreaterThan
-
The value of
Nameis greater thanValue. Not supported for text properties. - GreaterThanOrEqualTo
-
The value of
Nameis greater than or equal toValue. Not supported for text properties. - LessThan
-
The value of
Nameis less thanValue. Not supported for text properties. - LessThanOrEqualTo
-
The value of
Nameis less than or equal toValue. Not supported for text properties. - In
-
The value of
Nameis one of the comma delimited strings inValue. Only supported for text properties. - Contains
-
The value of
Namecontains the stringValue. Only supported for text properties.A
SearchExpressioncan include theContainsoperator multiple times when the value ofNameis one of the following:-
Experiment.DisplayName -
Experiment.ExperimentName -
Experiment.Tags -
Trial.DisplayName -
Trial.TrialName -
Trial.Tags -
TrialComponent.DisplayName -
TrialComponent.TrialComponentName -
TrialComponent.Tags -
TrialComponent.InputArtifacts -
TrialComponent.OutputArtifacts
A
SearchExpressioncan include only oneContainsoperator for all other values ofName. In these cases, if you include multipleContainsoperators in theSearchExpression, the result is the following error message: "'CONTAINS' operator usage limit of 1 exceeded." -
- See Also:
Operator
-
operatorAsString
public final String operatorAsString()
A Boolean binary operator that is used to evaluate the filter. The operator field contains one of the following values:
- Equals
-
The value of
NameequalsValue. - NotEquals
-
The value of
Namedoesn't equalValue. - Exists
-
The
Nameproperty exists. - NotExists
-
The
Nameproperty does not exist. - GreaterThan
-
The value of
Nameis greater thanValue. Not supported for text properties. - GreaterThanOrEqualTo
-
The value of
Nameis greater than or equal toValue. Not supported for text properties. - LessThan
-
The value of
Nameis less thanValue. Not supported for text properties. - LessThanOrEqualTo
-
The value of
Nameis less than or equal toValue. Not supported for text properties. - In
-
The value of
Nameis one of the comma delimited strings inValue. Only supported for text properties. - Contains
-
The value of
Namecontains the stringValue. Only supported for text properties.A
SearchExpressioncan include theContainsoperator multiple times when the value ofNameis one of the following:-
Experiment.DisplayName -
Experiment.ExperimentName -
Experiment.Tags -
Trial.DisplayName -
Trial.TrialName -
Trial.Tags -
TrialComponent.DisplayName -
TrialComponent.TrialComponentName -
TrialComponent.Tags -
TrialComponent.InputArtifacts -
TrialComponent.OutputArtifacts
A
SearchExpressioncan include only oneContainsoperator for all other values ofName. In these cases, if you include multipleContainsoperators in theSearchExpression, the result is the following error message: "'CONTAINS' operator usage limit of 1 exceeded." -
If the service returns an enum value that is not available in the current SDK version,
operatorwill returnOperator.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromoperatorAsString().- Returns:
- A Boolean binary operator that is used to evaluate the filter. The operator field contains one of the
following values:
- Equals
-
The value of
NameequalsValue. - NotEquals
-
The value of
Namedoesn't equalValue. - Exists
-
The
Nameproperty exists. - NotExists
-
The
Nameproperty does not exist. - GreaterThan
-
The value of
Nameis greater thanValue. Not supported for text properties. - GreaterThanOrEqualTo
-
The value of
Nameis greater than or equal toValue. Not supported for text properties. - LessThan
-
The value of
Nameis less thanValue. Not supported for text properties. - LessThanOrEqualTo
-
The value of
Nameis less than or equal toValue. Not supported for text properties. - In
-
The value of
Nameis one of the comma delimited strings inValue. Only supported for text properties. - Contains
-
The value of
Namecontains the stringValue. Only supported for text properties.A
SearchExpressioncan include theContainsoperator multiple times when the value ofNameis one of the following:-
Experiment.DisplayName -
Experiment.ExperimentName -
Experiment.Tags -
Trial.DisplayName -
Trial.TrialName -
Trial.Tags -
TrialComponent.DisplayName -
TrialComponent.TrialComponentName -
TrialComponent.Tags -
TrialComponent.InputArtifacts -
TrialComponent.OutputArtifacts
A
SearchExpressioncan include only oneContainsoperator for all other values ofName. In these cases, if you include multipleContainsoperators in theSearchExpression, the result is the following error message: "'CONTAINS' operator usage limit of 1 exceeded." -
- See Also:
Operator
-
value
public final String value()
A value used with
NameandOperatorto determine which resources satisfy the filter's condition. For numerical properties,Valuemust be an integer or floating-point decimal. For timestamp properties,Valuemust be an ISO 8601 date-time string of the following format:YYYY-mm-dd'T'HH:MM:SS.- Returns:
- A value used with
NameandOperatorto determine which resources satisfy the filter's condition. For numerical properties,Valuemust be an integer or floating-point decimal. For timestamp properties,Valuemust be an ISO 8601 date-time string of the following format:YYYY-mm-dd'T'HH:MM:SS.
-
toBuilder
public Filter.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Filter.Builder,Filter>
-
builder
public static Filter.Builder builder()
-
serializableBuilderClass
public static Class<? extends Filter.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
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.
-
-