Interface IPolicyEngine
- All Superinterfaces:
software.constructs.IConstruct,software.constructs.IDependable,IEnvironmentAware,IGrantable,IPolicyEngineRef,IResource,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IPolicyEngine.Jsii$Default
- All Known Implementing Classes:
IPolicyEngine.Jsii$Proxy,PolicyEngine,PolicyEngineBase
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInternal default implementation forIPolicyEngine.static final classA proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptiondefault StringThe description of the policy engine.default IKeyThe KMS key used for encryption.The ARN of the policy engine resource.The ID of the policy engine.The name of the policy engine.grant(IGrantable grantee, String... actions) Grants IAM actions to the IAM Principal.grantEvaluate(IGrantable grantee) Grants permissions to evaluate policies at runtime .grantEvaluateForGateway(IGrantable grantee, IGateway gateway) Grants the full set of permissions required for a gateway execution role to use this policy engine, correctly scoped to both the policy engine and gateway ARNs.grantRead(IGrantable grantee) Grants read permissions on the PolicyEngine.Return the given named metric for this policy engine.metric(String metricName, MetricOptions props) Return the given named metric for this policy engine.Return a metric measuring the authorization latency for this policy engine.Return a metric measuring the authorization latency for this policy engine.Return a metric containing the number of denied authorization requests for this policy engine.Return a metric containing the number of denied authorization requests for this policy engine.Return a metric containing the number of errors during authorization for this policy engine.metricErrors(MetricOptions props) Return a metric containing the number of errors during authorization for this policy engine.Methods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.services.iam.IGrantable
getGrantPrincipalMethods inherited from interface software.amazon.awscdk.interfaces.bedrockagentcore.IPolicyEngineRef
getPolicyEngineRefMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPolicyEngineArn
The ARN of the policy engine resource. -
getPolicyEngineId
The ID of the policy engine. -
getPolicyEngineName
The name of the policy engine. -
getDescription
The description of the policy engine. -
getKmsKey
The KMS key used for encryption. -
grant
Grants IAM actions to the IAM Principal.- Parameters:
grantee-- The IAM principal to grant permissions to.
actions-- The actions to grant.
-
grantEvaluate
Grants permissions to evaluate policies at runtime .This is the primary permission needed by Gateway execution roles to evaluate authorization decisions during agent requests. Grant this to roles that need to call AuthorizeAction or PartiallyAuthorizeActions.
- Parameters:
grantee-- The IAM principal to grant evaluation permissions to.
-
grantEvaluateForGateway
@Stability(Stable) @NotNull Grant grantEvaluateForGateway(@NotNull IGrantable grantee, @NotNull IGateway gateway) Grants the full set of permissions required for a gateway execution role to use this policy engine, correctly scoped to both the policy engine and gateway ARNs.Per the AWS docs,
AuthorizeActionandPartiallyAuthorizeActionsrequire both the policy engine ARN and the gateway ARN as resources, whileGetPolicyEngineonly needs the policy engine ARN.This follows the same pattern as Lambda's
grantInvokeVersion(grantee, version).- Parameters:
grantee-- The IAM principal (gateway execution role) to grant permissions to.
gateway-- The gateway that will use this policy engine [disable-awslint:prefer-ref-interface].
-
grantRead
Grants read permissions on the PolicyEngine.This grants runtime read access to policy engine configuration. Use this for monitoring, observability, or read-only administrative roles.
- Parameters:
grantee-- The IAM principal to grant read permissions to.
-
metric
@Stability(Stable) @NotNull Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this policy engine.- Parameters:
metricName- The name of the metric. This parameter is required.props- Optional metric configuration.
-
metric
Return the given named metric for this policy engine.- Parameters:
metricName- The name of the metric. This parameter is required.
-
metricAuthorizationLatency
Return a metric measuring the authorization latency for this policy engine.This metric represents the time taken to evaluate authorization policies.
- Parameters:
props- Optional metric configuration.
-
metricAuthorizationLatency
Return a metric measuring the authorization latency for this policy engine.This metric represents the time taken to evaluate authorization policies.
-
metricDeniedRequests
Return a metric containing the number of denied authorization requests for this policy engine.This metric tracks authorization requests that were explicitly denied by policies.
- Parameters:
props- Optional metric configuration.
-
metricDeniedRequests
Return a metric containing the number of denied authorization requests for this policy engine.This metric tracks authorization requests that were explicitly denied by policies.
-
metricErrors
Return a metric containing the number of errors during authorization for this policy engine.This metric tracks errors encountered during policy evaluation.
- Parameters:
props- Optional metric configuration.
-
metricErrors
Return a metric containing the number of errors during authorization for this policy engine.This metric tracks errors encountered during policy evaluation.
-