@Generated(value="software.amazon.awssdk:codegen") public final class PolicyDefinition extends Object implements SdkPojo, Serializable, ToCopyableBuilder<PolicyDefinition.Builder,PolicyDefinition>
A structure that contains the details for a Cedar policy definition. It includes the policy type, a description, and a policy body. This is a top level data type used to create a policy.
This data type is used as a request parameter for the CreatePolicy
operation. This structure must always have either an static or a templateLinked element.
| Modifier and Type | Class and Description |
|---|---|
static interface |
PolicyDefinition.Builder |
static class |
PolicyDefinition.Type |
| Modifier and Type | Method and Description |
|---|---|
static PolicyDefinition.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
static PolicyDefinition |
fromStaticValue(Consumer<StaticPolicyDefinition.Builder> staticValue)
Create an instance of this class with
staticValue() initialized to the given value. |
static PolicyDefinition |
fromStaticValue(StaticPolicyDefinition staticValue)
Create an instance of this class with
staticValue() initialized to the given value. |
static PolicyDefinition |
fromTemplateLinked(Consumer<TemplateLinkedPolicyDefinition.Builder> templateLinked)
Create an instance of this class with
templateLinked() initialized to the given value. |
static PolicyDefinition |
fromTemplateLinked(TemplateLinkedPolicyDefinition templateLinked)
Create an instance of this class with
templateLinked() initialized to the given value. |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
List<SdkField<?>> |
sdkFields() |
static Class<? extends PolicyDefinition.Builder> |
serializableBuilderClass() |
StaticPolicyDefinition |
staticValue()
A structure that describes a static policy.
|
TemplateLinkedPolicyDefinition |
templateLinked()
A structure that describes a policy that was instantiated from a template.
|
PolicyDefinition.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
PolicyDefinition.Type |
type()
Retrieve an enum value representing which member of this object is populated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final StaticPolicyDefinition staticValue()
A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.
public final TemplateLinkedPolicyDefinition templateLinked()
A structure that describes a policy that was instantiated from a template. The template can specify placeholders
for principal and resource. When you use CreatePolicy
to create a policy from a template, you specify the exact principal and resource to use for the instantiated
policy.
principal and resource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use
for the instantiated policy.public PolicyDefinition.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<PolicyDefinition.Builder,PolicyDefinition>public static PolicyDefinition.Builder builder()
public static Class<? extends PolicyDefinition.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public static PolicyDefinition fromStaticValue(StaticPolicyDefinition staticValue)
staticValue() initialized to the given value.
A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.
staticValue - A structure that describes a static policy. An static policy doesn't use a template or allow placeholders
for entities.public static PolicyDefinition fromStaticValue(Consumer<StaticPolicyDefinition.Builder> staticValue)
staticValue() initialized to the given value.
A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.
staticValue - A structure that describes a static policy. An static policy doesn't use a template or allow placeholders
for entities.public static PolicyDefinition fromTemplateLinked(TemplateLinkedPolicyDefinition templateLinked)
templateLinked() initialized to the given value.
A structure that describes a policy that was instantiated from a template. The template can specify placeholders
for principal and resource. When you use CreatePolicy
to create a policy from a template, you specify the exact principal and resource to use for the instantiated
policy.
templateLinked - A structure that describes a policy that was instantiated from a template. The template can specify
placeholders for principal and resource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use
for the instantiated policy.public static PolicyDefinition fromTemplateLinked(Consumer<TemplateLinkedPolicyDefinition.Builder> templateLinked)
templateLinked() initialized to the given value.
A structure that describes a policy that was instantiated from a template. The template can specify placeholders
for principal and resource. When you use CreatePolicy
to create a policy from a template, you specify the exact principal and resource to use for the instantiated
policy.
templateLinked - A structure that describes a policy that was instantiated from a template. The template can specify
placeholders for principal and resource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use
for the instantiated policy.public PolicyDefinition.Type type()
PolicyDefinition.Type.UNKNOWN_TO_SDK_VERSION if the
service returned a member that is only known to a newer SDK version.
When this class is created directly in your code, this will be PolicyDefinition.Type.UNKNOWN_TO_SDK_VERSION if zero
members are set, and null if more than one member is set.Copyright © 2023. All rights reserved.