Interface PolicyAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
PolicyAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-09-10T17:51:40.338Z")
@Stability(Stable)
public interface PolicyAttributes
extends software.amazon.jsii.JsiiSerializable
Attributes for importing an existing Policy.
Example:
IPolicyEngine importedEngine = PolicyEngine.fromPolicyEngineAttributes(this, "ImportedEngine", PolicyEngineAttributes.builder()
.policyEngineArn("policy-engine/my-engine-id")
.build());
IPolicy importedPolicy = Policy.fromPolicyAttributes(this, "ImportedPolicy", PolicyAttributes.builder()
.policyArn("my-policy-arn")
.policyEngine(importedEngine)
.build());
// Grant permissions to the imported policy
Role role = Role.Builder.create(this, "PolicyRole")
.assumedBy(new ServicePrincipal("lambda.amazonaws.com"))
.build();
importedPolicy.grantRead(role);
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forPolicyAttributesstatic final classAn implementation forPolicyAttributes -
Method Summary
Modifier and TypeMethodDescriptionstatic PolicyAttributes.Builderbuilder()The ARN of the policy.The policy engine this policy belongs to [disable-awslint:prefer-ref-interface].Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPolicyArn
The ARN of the policy. -
getPolicyEngine
The policy engine this policy belongs to [disable-awslint:prefer-ref-interface]. -
builder
- Returns:
- a
PolicyAttributes.BuilderofPolicyAttributes
-