Class Check
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Check.Builder,Check>
Represents one authorization requirement considered during an evaluation and its result.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Check.Builderbuilder()final CheckTypeThe type of requirement that the check evaluates.final StringThe type of requirement that the check evaluates.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final CheckEffectThe result of evaluating this requirement.final StringThe result of evaluating this requirement.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final booleanFor responses, this returns true if the service returned a value for the MatchedPolicies property.final booleanFor responses, this returns true if the service returned a value for the RelevantPolicyTypes property.final List<MatchedPolicy> Policies in this list have statements that matched for this check.final List<PolicyType> The policy types used to satisfy this check, plus the type of every policy with a statement that matched in it.The policy types used to satisfy this check, plus the type of every policy with a statement that matched in it.static Class<? extends Check.Builder> final StringThe ARN that distinguishes this check from other checks of the same type.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
checkType
The type of requirement that the check evaluates. Valid values:
-
SERVICE_CONTROL_POLICY- The service control policies (SCPs) attached to one organization target, such as a root, organizational unit, or account, that apply to the principal. -
RESOURCE_CONTROL_POLICY- The resource control policies (RCPs) attached to one organization target that apply to the resource. -
VPC_ENDPOINT- The VPC endpoint policy for the endpoint through which the request passes. -
RESOURCE- The resource owner's resource-based policies, when the owner must allow the request separately, such as a cross-account request or a request to an AWS KMS key. -
PRINCIPAL- The principal's identity-based policies attached to the IAM user or role. -
PERMISSIONS_BOUNDARY- The permissions boundary on the IAM user or role. -
SESSION- The role session that made the request, decided by its session policies.
If the service returns an enum value that is not available in the current SDK version,
checkTypewill returnCheckType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcheckTypeAsString().- Returns:
- The type of requirement that the check evaluates. Valid values:
-
SERVICE_CONTROL_POLICY- The service control policies (SCPs) attached to one organization target, such as a root, organizational unit, or account, that apply to the principal. -
RESOURCE_CONTROL_POLICY- The resource control policies (RCPs) attached to one organization target that apply to the resource. -
VPC_ENDPOINT- The VPC endpoint policy for the endpoint through which the request passes. -
RESOURCE- The resource owner's resource-based policies, when the owner must allow the request separately, such as a cross-account request or a request to an AWS KMS key. -
PRINCIPAL- The principal's identity-based policies attached to the IAM user or role. -
PERMISSIONS_BOUNDARY- The permissions boundary on the IAM user or role. -
SESSION- The role session that made the request, decided by its session policies.
-
- See Also:
-
-
checkTypeAsString
The type of requirement that the check evaluates. Valid values:
-
SERVICE_CONTROL_POLICY- The service control policies (SCPs) attached to one organization target, such as a root, organizational unit, or account, that apply to the principal. -
RESOURCE_CONTROL_POLICY- The resource control policies (RCPs) attached to one organization target that apply to the resource. -
VPC_ENDPOINT- The VPC endpoint policy for the endpoint through which the request passes. -
RESOURCE- The resource owner's resource-based policies, when the owner must allow the request separately, such as a cross-account request or a request to an AWS KMS key. -
PRINCIPAL- The principal's identity-based policies attached to the IAM user or role. -
PERMISSIONS_BOUNDARY- The permissions boundary on the IAM user or role. -
SESSION- The role session that made the request, decided by its session policies.
If the service returns an enum value that is not available in the current SDK version,
checkTypewill returnCheckType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcheckTypeAsString().- Returns:
- The type of requirement that the check evaluates. Valid values:
-
SERVICE_CONTROL_POLICY- The service control policies (SCPs) attached to one organization target, such as a root, organizational unit, or account, that apply to the principal. -
RESOURCE_CONTROL_POLICY- The resource control policies (RCPs) attached to one organization target that apply to the resource. -
VPC_ENDPOINT- The VPC endpoint policy for the endpoint through which the request passes. -
RESOURCE- The resource owner's resource-based policies, when the owner must allow the request separately, such as a cross-account request or a request to an AWS KMS key. -
PRINCIPAL- The principal's identity-based policies attached to the IAM user or role. -
PERMISSIONS_BOUNDARY- The permissions boundary on the IAM user or role. -
SESSION- The role session that made the request, decided by its session policies.
-
- See Also:
-
-
evaluatedEffect
The result of evaluating this requirement. Valid values:
-
ALLOW- A statement that applies to this check allows the request. -
EXPLICIT_DENY- A deny statement that applies to this check matches. -
IMPLICIT_DENY- The check required an allow and nothing that applies to it allows the request. -
NO_IMPACT- No statement in this check matched, and no allow was needed because another path allowed the request.
If the service returns an enum value that is not available in the current SDK version,
evaluatedEffectwill returnCheckEffect.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromevaluatedEffectAsString().- Returns:
- The result of evaluating this requirement. Valid values:
-
ALLOW- A statement that applies to this check allows the request. -
EXPLICIT_DENY- A deny statement that applies to this check matches. -
IMPLICIT_DENY- The check required an allow and nothing that applies to it allows the request. -
NO_IMPACT- No statement in this check matched, and no allow was needed because another path allowed the request.
-
- See Also:
-
-
evaluatedEffectAsString
The result of evaluating this requirement. Valid values:
-
ALLOW- A statement that applies to this check allows the request. -
EXPLICIT_DENY- A deny statement that applies to this check matches. -
IMPLICIT_DENY- The check required an allow and nothing that applies to it allows the request. -
NO_IMPACT- No statement in this check matched, and no allow was needed because another path allowed the request.
If the service returns an enum value that is not available in the current SDK version,
evaluatedEffectwill returnCheckEffect.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromevaluatedEffectAsString().- Returns:
- The result of evaluating this requirement. Valid values:
-
ALLOW- A statement that applies to this check allows the request. -
EXPLICIT_DENY- A deny statement that applies to this check matches. -
IMPLICIT_DENY- The check required an allow and nothing that applies to it allows the request. -
NO_IMPACT- No statement in this check matched, and no allow was needed because another path allowed the request.
-
- See Also:
-
-
targetArn
The ARN that distinguishes this check from other checks of the same type. This value is absent when the check type alone identifies the check. For SCP and RCP checks, this is the AWS Organizations ARN of the root, organizational unit, or account that the evaluated policies are attached to.
- Returns:
- The ARN that distinguishes this check from other checks of the same type. This value is absent when the check type alone identifies the check. For SCP and RCP checks, this is the AWS Organizations ARN of the root, organizational unit, or account that the evaluated policies are attached to.
-
relevantPolicyTypes
The policy types used to satisfy this check, plus the type of every policy with a statement that matched in it.
matchedPolicieslists matching policies in the top-levelpolicieslist.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
hasRelevantPolicyTypes()method.- Returns:
- The policy types used to satisfy this check, plus the type of every policy with a statement that matched
in it.
matchedPolicieslists matching policies in the top-levelpolicieslist.
-
hasRelevantPolicyTypes
public final boolean hasRelevantPolicyTypes()For responses, this returns true if the service returned a value for the RelevantPolicyTypes property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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. -
relevantPolicyTypesAsStrings
The policy types used to satisfy this check, plus the type of every policy with a statement that matched in it.
matchedPolicieslists matching policies in the top-levelpolicieslist.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
hasRelevantPolicyTypes()method.- Returns:
- The policy types used to satisfy this check, plus the type of every policy with a statement that matched
in it.
matchedPolicieslists matching policies in the top-levelpolicieslist.
-
hasMatchedPolicies
public final boolean hasMatchedPolicies()For responses, this returns true if the service returned a value for the MatchedPolicies property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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. -
matchedPolicies
Policies in this list have statements that matched for this check. Each URI corresponds to an entry in the top-level
policieslist. Only policies in the top-level list are included. The check effect can reflect a matched policy omitted from this list, so this list can be empty even when the effect isALLOW.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
hasMatchedPolicies()method.- Returns:
- Policies in this list have statements that matched for this check. Each URI corresponds to an entry in
the top-level
policieslist. Only policies in the top-level list are included. The check effect can reflect a matched policy omitted from this list, so this list can be empty even when the effect isALLOW.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<Check.Builder,Check> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-