Class CfnPolicy.PolicyDefinitionProperty
A structure that defines a Cedar policy.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.VerifiedPermissions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnPolicy.PolicyDefinitionProperty : CfnPolicy.IPolicyDefinitionProperty
Syntax (vb)
Public Class CfnPolicy.PolicyDefinitionProperty Implements CfnPolicy.IPolicyDefinitionProperty
Remarks
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.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.VerifiedPermissions;
var policyDefinitionProperty = new PolicyDefinitionProperty {
Static = new StaticPolicyDefinitionProperty {
Statement = "statement",
// the properties below are optional
Description = "description"
},
TemplateLinked = new TemplateLinkedPolicyDefinitionProperty {
PolicyTemplateId = "policyTemplateId",
// the properties below are optional
Principal = new EntityIdentifierProperty {
EntityId = "entityId",
EntityType = "entityType"
},
Resource = new EntityIdentifierProperty {
EntityId = "entityId",
EntityType = "entityType"
}
}
};
Synopsis
Constructors
| PolicyDefinitionProperty() | A structure that defines a Cedar policy. |
Properties
| Static | A structure that describes a static policy. |
| TemplateLinked | A structure that describes a policy that was instantiated from a template. |
Constructors
PolicyDefinitionProperty()
A structure that defines a Cedar policy.
public PolicyDefinitionProperty()
Remarks
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.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.VerifiedPermissions;
var policyDefinitionProperty = new PolicyDefinitionProperty {
Static = new StaticPolicyDefinitionProperty {
Statement = "statement",
// the properties below are optional
Description = "description"
},
TemplateLinked = new TemplateLinkedPolicyDefinitionProperty {
PolicyTemplateId = "policyTemplateId",
// the properties below are optional
Principal = new EntityIdentifierProperty {
EntityId = "entityId",
EntityType = "entityType"
},
Resource = new EntityIdentifierProperty {
EntityId = "entityId",
EntityType = "entityType"
}
}
};
Properties
Static
A structure that describes a static policy.
public object? Static { get; set; }
Property Value
Remarks
An static policy doesn't use a template or allow placeholders for entities.
Type union: either IResolvable or CfnPolicy.IStaticPolicyDefinitionProperty
TemplateLinked
A structure that describes a policy that was instantiated from a template.
public object? TemplateLinked { get; set; }
Property Value
Remarks
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.
Type union: either IResolvable or CfnPolicy.ITemplateLinkedPolicyDefinitionProperty