Show / Hide Table of Contents

Interface IPolicy

Minimal reference interface for Policy resources.

Inherited Members
IResource.ApplyRemovalPolicy(RemovalPolicy)
IResource.Stack
IPolicyRef.PolicyRef
IEnvironmentAware.Env
IGrantable.GrantPrincipal
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

string

Remarks

Used for resource identification and ARN construction.

PolicyArn

The ARN of the policy resource.

string PolicyArn { get; }
Property Value

string

Remarks

Attribute: true

PolicyEngine

The policy engine this policy belongs to.

IPolicyEngine PolicyEngine { get; }
Property Value

IPolicyEngine

Remarks

Attribute: true

PolicyId

The ID of the policy.

string PolicyId { get; }
Property Value

string

Remarks

Attribute: true

PolicyName

The name of the policy.

string PolicyName { get; }
Property Value

string

Remarks

Attribute: true

ValidationMode

The validation mode for the policy.

PolicyValidationMode? ValidationMode { get; }
Property Value

PolicyValidationMode

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

Grant

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

Grant

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

Metric

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

Metric

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

Metric

Remarks

This metric tracks how many times this policy has been evaluated.

Back to top Generated by DocFX