aws-cdk-lib.aws_verifiedpermissions.CfnPolicy.PolicyDefinitionProperty

interface PolicyDefinitionProperty

LanguageType name
.NETAmazon.CDK.aws_verifiedpermissions.CfnPolicy.PolicyDefinitionProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsverifiedpermissions#CfnPolicy_PolicyDefinitionProperty
Javaservices.verifiedpermissions.CfnPolicy.PolicyDefinitionProperty
Pythonaws_cdk.aws_verifiedpermissions.CfnPolicy.PolicyDefinitionProperty
TypeScript aws-cdk-lib » aws_verifiedpermissions » CfnPolicy » PolicyDefinitionProperty

A structure that defines a Cedar policy.

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 { aws_verifiedpermissions as verifiedpermissions } from 'aws-cdk-lib';
const policyDefinitionProperty: verifiedpermissions.CfnPolicy.PolicyDefinitionProperty = {
  static: {
    statement: 'statement',

    // the properties below are optional
    description: 'description',
  },
  templateLinked: {
    policyTemplateId: 'policyTemplateId',

    // the properties below are optional
    principal: {
      entityId: 'entityId',
      entityType: 'entityType',
    },
    resource: {
      entityId: 'entityId',
      entityType: 'entityType',
    },
  },
};

Properties

NameTypeDescription
static?IResolvable | StaticPolicyDefinitionPropertyA structure that describes a static policy.
templateLinked?IResolvable | TemplateLinkedPolicyDefinitionPropertyA structure that describes a policy that was instantiated from a template.

static?

Type: IResolvable | StaticPolicyDefinitionProperty (optional)

A structure that describes a static policy.

An static policy doesn't use a template or allow placeholders for entities.


templateLinked?

Type: IResolvable | TemplateLinkedPolicyDefinitionProperty (optional)

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.