Skip to content
v2.278.0

TemplateLinkedPolicyDefinitionProperty Struct ​

A structure that describes a policy created by instantiating a policy template.

You can't directly update a template-linked policy. You must update the associated policy template instead.

Example ​

ts
// 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 templateLinkedPolicyDefinitionProperty: verifiedpermissions.CfnPolicy.TemplateLinkedPolicyDefinitionProperty = {
  policyTemplateId: 'policyTemplateId',

  // the properties below are optional
  principal: {
    entityId: 'entityId',
    entityType: 'entityType',
  },
  resource: {
    entityId: 'entityId',
    entityType: 'entityType',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_verifiedpermissions as verifiedpermissions

template_linked_policy_definition_property = verifiedpermissions.CfnPolicy.TemplateLinkedPolicyDefinitionProperty(
    policy_template_id="policyTemplateId",

    # the properties below are optional
    principal=verifiedpermissions.CfnPolicy.EntityIdentifierProperty(
        entity_id="entityId",
        entity_type="entityType"
    ),
    resource=verifiedpermissions.CfnPolicy.EntityIdentifierProperty(
        entity_id="entityId",
        entity_type="entityType"
    )
)
java
// 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.*;

TemplateLinkedPolicyDefinitionProperty templateLinkedPolicyDefinitionProperty = 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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 templateLinkedPolicyDefinitionProperty = new TemplateLinkedPolicyDefinitionProperty {
    PolicyTemplateId = "policyTemplateId",

    // the properties below are optional
    Principal = new EntityIdentifierProperty {
        EntityId = "entityId",
        EntityType = "entityType"
    },
    Resource = new EntityIdentifierProperty {
        EntityId = "entityId",
        EntityType = "entityType"
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

templateLinkedPolicyDefinitionProperty := &TemplateLinkedPolicyDefinitionProperty{
	PolicyTemplateId: jsii.String("policyTemplateId"),

	// the properties below are optional
	Principal: &EntityIdentifierProperty{
		EntityId: jsii.String("entityId"),
		EntityType: jsii.String("entityType"),
	},
	Resource: &EntityIdentifierProperty{
		EntityId: jsii.String("entityId"),
		EntityType: jsii.String("entityType"),
	},
}

Properties ​

policyTemplateIdstringpolicy_template_idstrpolicyTemplateIdStringPolicyTemplateIdstringPolicyTemplateId*string required #
The unique identifier of the policy template used to create this policy.
principaloptionalIResolvable | CfnPolicy.EntityIdentifierPropertyprincipaloptionaltyping.Union[IResolvable, EntityIdentifierProperty]principaloptionalIResolvablePrincipaloptionalIResolvablePrincipaloptionalinterface{} #
The principal associated with this template-linked policy.

Verified Permissions substitutes this principal for the ?principal placeholder in the policy template when it evaluates an authorization request.

resourceoptionalIResolvable | CfnPolicy.EntityIdentifierPropertyresourceoptionaltyping.Union[IResolvable, EntityIdentifierProperty]resourceoptionalIResolvableResourceoptionalIResolvableResourceoptionalinterface{} #
The resource associated with this template-linked policy.

Verified Permissions substitutes this resource for the ?resource placeholder in the policy template when it evaluates an authorization request.