Class PolicyBase
- All Implemented Interfaces:
IPolicyRef,IEnvironmentAware,IResource,IPolicy,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
Policy
Contains methods and attributes valid for Policies either created with CDK or imported.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.bedrockagentcore.IPolicy
IPolicy.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPolicyBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedPolicyBase(software.amazon.jsii.JsiiObjectRef objRef) protectedPolicyBase(software.constructs.Construct scope, String id) protectedPolicyBase(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionabstract StringThe description of the policy.abstract IPrincipalThe principal to grant permissions to.abstract StringThe ARN of the policy resource.abstract IPolicyEngineThe policy engine this policy belongs to.abstract StringThe ID of the policy.abstract StringThe name of the policy.A reference to this Policy resource.abstract PolicyValidationModeThe validation mode for the policy.grant(IGrantable grantee, String... actions) Grants IAM actions to the IAM Principal.grantRead(IGrantable grantee) Grants read permissions on the Policy (data plane).Return the given named metric for this policy.metric(String metricName, MetricOptions props) Return the given named metric for this policy.Return a metric measuring the evaluation latency for this policy.Return a metric measuring the evaluation latency for this policy.Return a metric containing the total number of evaluations for this policy.metricEvaluations(MetricOptions props) Return a metric containing the total number of evaluations for this policy.Methods inherited from class software.amazon.awscdk.Resource
applyCrossStackReferenceStrength, applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource, withMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
PolicyBase
protected PolicyBase(software.amazon.jsii.JsiiObjectRef objRef) -
PolicyBase
protected PolicyBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
PolicyBase
@Stability(Stable) protected PolicyBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
PolicyBase
@Stability(Stable) protected PolicyBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
grant
@Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) Grants IAM actions to the IAM Principal.[disable-awslint:no-grants]
-
grantRead
Grants read permissions on the Policy (data plane).This grants runtime read access to policy configuration. Use this for monitoring, audit, or read-only administrative roles that need to inspect policy definitions and Cedar statements at runtime.
IMPORTANT: This does NOT grant permissions to create/update/delete the Policy resource itself. Those are control plane operations performed by CloudFormation during
cdk deploy, not by your application at runtime.[disable-awslint:no-grants]
-
metric
@Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this policy.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties. -
metric
Return the given named metric for this policy.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties. -
metricEvaluationLatency
Return a metric measuring the evaluation latency for this policy.This metric represents the time taken to evaluate this specific policy.
- Specified by:
metricEvaluationLatencyin interfaceIPolicy- Parameters:
props- Optional metric configuration.
-
metricEvaluationLatency
Return a metric measuring the evaluation latency for this policy.This metric represents the time taken to evaluate this specific policy.
- Specified by:
metricEvaluationLatencyin interfaceIPolicy
-
metricEvaluations
Return a metric containing the total number of evaluations for this policy.This metric tracks how many times this policy has been evaluated.
- Specified by:
metricEvaluationsin interfaceIPolicy- Parameters:
props- Optional metric configuration.
-
metricEvaluations
Return a metric containing the total number of evaluations for this policy.This metric tracks how many times this policy has been evaluated.
- Specified by:
metricEvaluationsin interfaceIPolicy
-
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipalin interfaceIGrantable
-
getPolicyArn
The ARN of the policy resource.- Specified by:
getPolicyArnin interfaceIPolicy
-
getPolicyEngine
The policy engine this policy belongs to.- Specified by:
getPolicyEnginein interfaceIPolicy
-
getPolicyId
The ID of the policy.- Specified by:
getPolicyIdin interfaceIPolicy
-
getPolicyName
The name of the policy.- Specified by:
getPolicyNamein interfaceIPolicy
-
getPolicyRef
A reference to this Policy resource.- Specified by:
getPolicyRefin interfaceIPolicyRef
-
getDescription
The description of the policy.- Specified by:
getDescriptionin interfaceIPolicy
-
getValidationMode
The validation mode for the policy.- Specified by:
getValidationModein interfaceIPolicy
-