Interface IPolicy
Minimal reference interface for Policy resources.
Inherited Members
Namespace: Amazon.CDK.AWS.BedrockAgentCore
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IPolicy : IResource, IPolicyRef, IConstruct, IDependable, IEnvironmentAware, IGrantable
Syntax (vb)
Public Interface IPolicy Inherits IResource, IPolicyRef, IConstruct, IDependable, IEnvironmentAware, IGrantable
Remarks
Used for resource identification and ARN construction.
Synopsis
Properties
| Description | The description of the policy. |
| PolicyArn | The ARN of the policy resource. |
| PolicyEngine | The policy engine this policy belongs to. |
| PolicyId | The ID of the policy. |
| PolicyName | The name of the policy. |
| ValidationMode | The validation mode for the policy. |
Methods
| Grant(IGrantable, params string[]) | Grants IAM actions to the IAM Principal. |
| GrantRead(IGrantable) | Grants read permissions on the Policy (data plane). |
| Metric(string, IMetricOptions?) | Return the given named metric for this policy. |
| MetricEvaluationLatency(IMetricOptions?) | Return a metric measuring the evaluation latency for this policy. |
| MetricEvaluations(IMetricOptions?) | Return a metric containing the total number of evaluations for this policy. |
Properties
Description
The description of the policy.
string? Description { get; }
Property Value
Remarks
Used for resource identification and ARN construction.
PolicyArn
The ARN of the policy resource.
string PolicyArn { get; }
Property Value
Remarks
Attribute: true
PolicyEngine
The policy engine this policy belongs to.
IPolicyEngine PolicyEngine { get; }
Property Value
Remarks
Attribute: true
PolicyId
PolicyName
ValidationMode
The validation mode for the policy.
PolicyValidationMode? ValidationMode { get; }
Property Value
Remarks
Used for resource identification and ARN construction.
Methods
Grant(IGrantable, params string[])
Grants IAM actions to the IAM Principal.
Grant Grant(IGrantable grantee, params string[] actions)
Parameters
- grantee IGrantable
- The IAM principal to grant permissions to.
- actions string[]
- The actions to grant.
Returns
Remarks
Used for resource identification and ARN construction.
GrantRead(IGrantable)
Grants read permissions on the Policy (data plane).
Grant GrantRead(IGrantable grantee)
Parameters
- grantee IGrantable
- The IAM principal to grant read permissions to.
Returns
Remarks
This grants runtime read access to policy configuration. Use this for monitoring, audit, or read-only administrative roles that need to inspect policy definitions.
Metric(string, IMetricOptions?)
Return the given named metric for this policy.
Metric Metric(string metricName, IMetricOptions? props = null)
Parameters
- metricName string
The name of the metric.
- props IMetricOptions
Optional metric configuration.
Returns
Remarks
Used for resource identification and ARN construction.
MetricEvaluationLatency(IMetricOptions?)
Return a metric measuring the evaluation latency for this policy.
Metric MetricEvaluationLatency(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Optional metric configuration.
Returns
Remarks
This metric represents the time taken to evaluate this specific policy.
MetricEvaluations(IMetricOptions?)
Return a metric containing the total number of evaluations for this policy.
Metric MetricEvaluations(IMetricOptions? props = null)
Parameters
- props IMetricOptions
Optional metric configuration.
Returns
Remarks
This metric tracks how many times this policy has been evaluated.