Class CfnPolicy
Creates or updates a Cedar policy and saves it in the specified policy store.
Implements
Inherited Members
Namespace: Amazon.CDK.AwsVerifiedpermissions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnPolicy : CfnResource, IInspectable
Syntax (vb)
Public Class CfnPolicy
Inherits CfnResource
Implements IInspectable
Remarks
You can create either a static policy or a policy linked to a policy template.
You can directly update only static policies. To update a template-linked policy, you must update its linked policy template instead.
You can't change these elements of a static policy:
CloudformationResource: AWS::VerifiedPermissions::Policy
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 cfnPolicy = new CfnPolicy(this, "MyCfnPolicy", new CfnPolicyProps {
Definition = 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"
}
}
},
PolicyStoreId = "policyStoreId"
});
Synopsis
Constructors
CfnPolicy(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnPolicy(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnPolicy(Construct, String, ICfnPolicyProps) |
Properties
AttrPolicyId | The unique ID of the new or updated policy. |
AttrPolicyType | The type of the policy. This is one of the following values:. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Definition | Specifies the policy type and content to use for the new or updated policy. |
PolicyStoreId | Specifies the |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnPolicy(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnPolicy(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnPolicy(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnPolicy(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnPolicy(Construct, String, ICfnPolicyProps)
public CfnPolicy(Construct scope, string id, ICfnPolicyProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnPolicyProps
Resource properties.
Properties
AttrPolicyId
The unique ID of the new or updated policy.
public virtual string AttrPolicyId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: PolicyId
AttrPolicyType
The type of the policy. This is one of the following values:.
public virtual string AttrPolicyType { get; }
Property Value
System.String
Remarks
CloudformationAttribute: PolicyType
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Definition
Specifies the policy type and content to use for the new or updated policy.
public virtual object Definition { get; set; }
Property Value
System.Object
PolicyStoreId
Specifies the PolicyStoreId
of the policy store you want to store the policy in.
public virtual string PolicyStoreId { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>