public class AwsPolicyBuilder extends Object
| Constructor and Description |
|---|
AwsPolicyBuilder() |
| Modifier and Type | Method and Description |
|---|---|
com.amazonaws.auth.policy.Policy |
build()
Returns the policy object.
|
AwsPolicyBuilder |
withKms(String kmsKeyId,
KmsActions... actions)
Adds a permission to allow the specified actions to the given KMS key id.
|
AwsPolicyBuilder |
withS3(String bucketName,
String objectKey,
com.amazonaws.auth.policy.actions.S3Actions... actions)
Adds a permission to allow the specified actions to the given bucket and s3 object key.
|
AwsPolicyBuilder |
withS3Prefix(String bucketName,
String prefix,
com.amazonaws.auth.policy.actions.S3Actions... actions)
Adds a permission to allow the specified actions to the given bucket and s3 key prefix.
|
public com.amazonaws.auth.policy.Policy build()
public AwsPolicyBuilder withKms(String kmsKeyId, KmsActions... actions)
kmsKeyId - Full ARN to the kms keyactions - List of actionspublic AwsPolicyBuilder withS3(String bucketName, String objectKey, com.amazonaws.auth.policy.actions.S3Actions... actions)
bucketName - S3 bucket nameobjectKey - S3 object keyactions - List of actions to allowpublic AwsPolicyBuilder withS3Prefix(String bucketName, String prefix, com.amazonaws.auth.policy.actions.S3Actions... actions)
bucketName - S3 Bucket nameprefix - S3 Object key prefixactions - List of actions to allowCopyright © 2021. All rights reserved.