@Generated(value="software.amazon.awssdk:codegen") public final class ContextEntry extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ContextEntry.Builder,ContextEntry>
Contains information about a condition context key. It includes the name of the key and specifies the value (or
values, if the context key supports multiple values) to use in the simulation. This information is used when
evaluating the Condition elements of the input policies.
This data type is used as an input parameter to SimulateCustomPolicy and SimulatePrincipalPolicy.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ContextEntry.Builder |
| Modifier and Type | Method and Description |
|---|---|
static ContextEntry.Builder |
builder() |
String |
contextKeyName()
The full name of a condition context key, including the service prefix.
|
ContextKeyTypeEnum |
contextKeyType()
The data type of the value (or values) specified in the
ContextKeyValues parameter. |
String |
contextKeyTypeAsString()
The data type of the value (or values) specified in the
ContextKeyValues parameter. |
List<String> |
contextKeyValues()
The value (or values, if the condition context key supports multiple values) to provide to the simulation when
the key is referenced by a
Condition element in an input policy. |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasContextKeyValues()
For responses, this returns true if the service returned a value for the ContextKeyValues property.
|
int |
hashCode() |
List<SdkField<?>> |
sdkFields() |
static Class<? extends ContextEntry.Builder> |
serializableBuilderClass() |
ContextEntry.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String contextKeyName()
The full name of a condition context key, including the service prefix. For example, aws:SourceIp or
s3:VersionId.
aws:SourceIp or s3:VersionId.public final boolean hasContextKeyValues()
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.public final List<String> contextKeyValues()
The value (or values, if the condition context key supports multiple values) to provide to the simulation when
the key is referenced by a Condition element in an input policy.
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 hasContextKeyValues() method.
Condition element in an input policy.public final ContextKeyTypeEnum contextKeyType()
The data type of the value (or values) specified in the ContextKeyValues parameter.
If the service returns an enum value that is not available in the current SDK version, contextKeyType
will return ContextKeyTypeEnum.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available
from contextKeyTypeAsString().
ContextKeyValues parameter.ContextKeyTypeEnumpublic final String contextKeyTypeAsString()
The data type of the value (or values) specified in the ContextKeyValues parameter.
If the service returns an enum value that is not available in the current SDK version, contextKeyType
will return ContextKeyTypeEnum.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available
from contextKeyTypeAsString().
ContextKeyValues parameter.ContextKeyTypeEnumpublic ContextEntry.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<ContextEntry.Builder,ContextEntry>public static ContextEntry.Builder builder()
public static Class<? extends ContextEntry.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.