AddToResourcePolicyResult Struct
Result of calling addToResourcePolicy.
Example
ts
const bucket = s3.Bucket.fromBucketName(this, 'existingBucket', 'amzn-s3-demo-bucket');
// No policy statement will be added to the resource
const result = bucket.addToResourcePolicy(
new iam.PolicyStatement({
actions: ['s3:GetObject'],
resources: [bucket.arnForObjects('file.txt')],
principals: [new iam.AccountRootPrincipal()],
})
);
Properties
policyDependableoptionalIDependablepolicy_dependableoptionalIDependablepolicyDependableoptionalIDependablePolicyDependableoptionalIDependablePolicyDependableoptionalIDependable#Dependable which allows depending on the policy change being applied.
Default: If statementAdded is true, the resource object itself. Otherwise, no dependable.
statementAddedbooleanstatement_addedboolstatementAddedBooleanStatementAddedboolStatementAdded*boolrequired#Whether the statement was added.