Class PolicyDefinition
- java.lang.Object
-
- software.amazon.awssdk.services.verifiedpermissions.model.PolicyDefinition
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<PolicyDefinition.Builder,PolicyDefinition>
@Generated("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
staticor atemplateLinkedelement.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePolicyDefinition.Builderstatic classPolicyDefinition.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PolicyDefinition.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static PolicyDefinitionfromStaticValue(Consumer<StaticPolicyDefinition.Builder> staticValue)Create an instance of this class withstaticValue()initialized to the given value.static PolicyDefinitionfromStaticValue(StaticPolicyDefinition staticValue)Create an instance of this class withstaticValue()initialized to the given value.static PolicyDefinitionfromTemplateLinked(Consumer<TemplateLinkedPolicyDefinition.Builder> templateLinked)Create an instance of this class withtemplateLinked()initialized to the given value.static PolicyDefinitionfromTemplateLinked(TemplateLinkedPolicyDefinition templateLinked)Create an instance of this class withtemplateLinked()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()List<SdkField<?>>sdkFields()static Class<? extends PolicyDefinition.Builder>serializableBuilderClass()StaticPolicyDefinitionstaticValue()A structure that describes a static policy.TemplateLinkedPolicyDefinitiontemplateLinked()A structure that describes a policy that was instantiated from a template.PolicyDefinition.BuildertoBuilder()StringtoString()Returns a string representation of this object.PolicyDefinition.Typetype()Retrieve an enum value representing which member of this object is populated.-
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
-
staticValue
public final StaticPolicyDefinition staticValue()
A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.
- Returns:
- A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.
-
templateLinked
public final TemplateLinkedPolicyDefinition templateLinked()
A structure that describes a policy that was instantiated from a template. The template can specify placeholders for
principalandresource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.- Returns:
- A structure that describes a policy that was instantiated from a template. The template can specify
placeholders for
principalandresource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.
-
toBuilder
public PolicyDefinition.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<PolicyDefinition.Builder,PolicyDefinition>
-
builder
public static PolicyDefinition.Builder builder()
-
serializableBuilderClass
public static Class<? extends PolicyDefinition.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.
-
fromStaticValue
public static PolicyDefinition fromStaticValue(StaticPolicyDefinition staticValue)
Create an instance of this class withstaticValue()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.
- Parameters:
staticValue- A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.
-
fromStaticValue
public static PolicyDefinition fromStaticValue(Consumer<StaticPolicyDefinition.Builder> staticValue)
Create an instance of this class withstaticValue()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.
- Parameters:
staticValue- A structure that describes a static policy. An static policy doesn't use a template or allow placeholders for entities.
-
fromTemplateLinked
public static PolicyDefinition fromTemplateLinked(TemplateLinkedPolicyDefinition templateLinked)
Create an instance of this class withtemplateLinked()initialized to the given value.A structure that describes a policy that was instantiated from a template. The template can specify placeholders for
principalandresource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.- Parameters:
templateLinked- A structure that describes a policy that was instantiated from a template. The template can specify placeholders forprincipalandresource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.
-
fromTemplateLinked
public static PolicyDefinition fromTemplateLinked(Consumer<TemplateLinkedPolicyDefinition.Builder> templateLinked)
Create an instance of this class withtemplateLinked()initialized to the given value.A structure that describes a policy that was instantiated from a template. The template can specify placeholders for
principalandresource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.- Parameters:
templateLinked- A structure that describes a policy that was instantiated from a template. The template can specify placeholders forprincipalandresource. When you use CreatePolicy to create a policy from a template, you specify the exact principal and resource to use for the instantiated policy.
-
type
public PolicyDefinition.Type type()
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will bePolicyDefinition.Type.UNKNOWN_TO_SDK_VERSIONif 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 bePolicyDefinition.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
-