Interface CfnPolicy.PolicyDefinitionProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnPolicy.PolicyDefinitionProperty.Jsii$Proxy
- Enclosing class:
CfnPolicy
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.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.verifiedpermissions.*;
PolicyDefinitionProperty policyDefinitionProperty = PolicyDefinitionProperty.builder()
.static(StaticPolicyDefinitionProperty.builder()
.statement("statement")
// the properties below are optional
.description("description")
.build())
.templateLinked(TemplateLinkedPolicyDefinitionProperty.builder()
.policyTemplateId("policyTemplateId")
// the properties below are optional
.principal(EntityIdentifierProperty.builder()
.entityId("entityId")
.entityType("entityType")
.build())
.resource(EntityIdentifierProperty.builder()
.entityId("entityId")
.entityType("entityType")
.build())
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnPolicy.PolicyDefinitionPropertystatic final classAn implementation forCfnPolicy.PolicyDefinitionProperty -
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getStaticValue
A structure that describes a static policy.An static policy doesn't use a template or allow placeholders for entities.
Returns union: either
IResolvableorCfnPolicy.StaticPolicyDefinitionProperty- See Also:
-
getTemplateLinked
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 union: either
IResolvableorCfnPolicy.TemplateLinkedPolicyDefinitionProperty- See Also:
-
builder
-